public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ed L Cashin <ecashin@coraid.com>
To: 7eggert@gmx.de
Cc: linux-kernel <linux-kernel@vger.kernel.org>, Greg K-H <greg@kroah.com>
Subject: Re: [PATCH] aoe: add documentation for udev users
Date: Thu, 20 Jan 2005 09:19:17 -0500	[thread overview]
Message-ID: <877jm8kwt6.fsf@coraid.com> (raw)
In-Reply-To: <E1CrSfr-0001l2-Et@be1.7eggert.dyndns.org> (Bodo Eggert's message of "Thu, 20 Jan 2005 04:07:54 +0100")

[-- Attachment #1: Type: text/plain, Size: 808 bytes --]

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

> Ed L Cashin <ecashin@coraid.com> wrote:
>
>> +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
>> +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>


[-- Attachment #2: patch-eggbert --]
[-- Type: text/plain, Size: 853 bytes --]

diff -uprN a/Documentation/aoe/udev-install.sh b/Documentation/aoe/udev-install.sh
--- a/Documentation/aoe/udev-install.sh	2005-01-20 09:14:58.000000000 -0500
+++ b/Documentation/aoe/udev-install.sh	2005-01-20 09:13:38.000000000 -0500
@@ -8,11 +8,15 @@ me="`basename $0`"
 # (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

[-- Attachment #3: Type: text/plain, Size: 41 bytes --]



-- 
  Ed L Cashin <ecashin@coraid.com>

  reply	other threads:[~2005-01-20 14:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <fa.gl94rva.1tkib28@ifi.uio.no>
2005-01-20  3:07 ` [PATCH] aoe: add documentation for udev users Bodo Eggert
2005-01-20 14:19   ` Ed L Cashin [this message]
2005-02-01  7:53     ` 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
  -- strict thread matches above, loose matches on Subject: below --
2005-01-19 21:10 Ed L Cashin
2005-02-01  7:53 ` 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=877jm8kwt6.fsf@coraid.com \
    --to=ecashin@coraid.com \
    --cc=7eggert@gmx.de \
    --cc=greg@kroah.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