public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Cc: ecashin@coraid.com
Subject: [PATCH] aoe: update documentation for udev users
Date: Wed, 9 Mar 2005 16:19:23 -0800	[thread overview]
Message-ID: <1110413963858@kroah.com> (raw)
In-Reply-To: <1110413963113@kroah.com>

ChangeSet 1.2037, 2005/03/09 10:21:15-08:00, ecashin@coraid.com

[PATCH] aoe: update documentation for udev users

Bodo Eggert <7eggert@gmx.de> writes:

> Ed L Cashin <ecashin@coraid.com> wrote:
>
>> +if=A0test=A0-z=A0"$conf";=A0then
>> +=A0=A0=A0=A0=A0=A0=A0=A0conf=3D"`find=A0/etc=A0-type=A0f=A0-name=A0udev=
.conf=A02>=A0/dev/null`"
>> +fi
>> +if=A0test=A0-z=A0"$conf"=A0||=A0test=A0!=A0-r=A0$conf;=A0then
>> +=A0=A0=A0=A0=A0=A0=A0=A0echo=A0"$me=A0Error:=A0could=A0not=A0find=A0rea=
dable=A0udev.conf=A0in=A0/etc"=A01>&2
>> +=A0=A0=A0=A0=A0=A0=A0=A0exit=A01
>> +fi
>
> This will fail and print
> ---
> bash: test: etc/udev.conf: binary operator expected
> ---
> if there is more than one udev.conf.
>
> Fix: Always put quotes around variables.

Thanks.  With the changes below, it still will complain if it finds
more than one udev.conf, but only if /etc/udev/udev.conf doesn't
exist.

Quote all shell variables, and use /etc/udev/udev.conf if available.

Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


 Documentation/aoe/udev-install.sh |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)


diff -Nru a/Documentation/aoe/udev-install.sh b/Documentation/aoe/udev-install.sh
--- a/Documentation/aoe/udev-install.sh	2005-03-09 16:16:00 -08:00
+++ b/Documentation/aoe/udev-install.sh	2005-03-09 16:16:00 -08:00
@@ -8,11 +8,15 @@
 # (or environment can specify where to find udev.conf)
 #
 if test -z "$conf"; then
-	conf="`find /etc -type f -name udev.conf 2> /dev/null`"
-fi
-if test -z "$conf" || test ! -r $conf; then
-	echo "$me Error: could not find readable udev.conf in /etc" 1>&2
-	exit 1
+	if test -r /etc/udev/udev.conf; then
+		conf=/etc/udev/udev.conf
+	else
+		conf="`find /etc -type f -name udev.conf 2> /dev/null`"
+		if test -z "$conf" || test ! -r "$conf"; then
+			echo "$me Error: no udev.conf found" 1>&2
+			exit 1
+		fi
+	fi
 fi
 
 # find the directory where udev rules are stored, often


  reply	other threads:[~2005-03-10  3:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-10  0:18 [BK PATCH] AOE fixes for 2.6.11 Greg KH
2005-03-10  0:19 ` [PATCH] AoE warning on 64-bit archs Greg KH
2005-03-10  0:19   ` [PATCH] aoe: add documentation for udev users Greg KH
2005-03-10  0:19     ` Greg KH [this message]
2005-03-10  0:19       ` [PATCH] aoe: fail IO on disk errors Greg KH
2005-03-10  0:19         ` [PATCH] aoe status.sh: handle sysfs not in /etc/mtab Greg KH
2005-03-10  0:19           ` [PATCH] aoe: drivers/block/aoe/aoechr.c cleanups Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1110413963858@kroah.com \
    --to=greg@kroah.com \
    --cc=ecashin@coraid.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox