2005-01-20 03:08:00

by Bodo Eggert

[permalink] [raw]
Subject: Re: [PATCH] aoe: add documentation for udev users

Ed L Cashin <[email protected]> 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.

2005-01-20 14:24:18

by Ed L. Cashin

[permalink] [raw]
Subject: Re: [PATCH] aoe: add documentation for udev users

Bodo Eggert <[email protected]> writes:

> Ed L Cashin <[email protected]> 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 <[email protected]>


Attachments:
patch-eggbert (853.00 B)
(No filename) (41.00 B)
Download all attachments

2005-02-01 07:55:58

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH] aoe: add documentation for udev users

On Wed, Jan 19, 2005 at 04:10:35PM -0500, Ed L Cashin wrote:
> Hi. This patch was generated against block-2.6 but should apply
> easily in other trees, since it touches only documentation.
>
>
> add documentation for udev users
>
> Signed-off-by: Ed L. Cashin <[email protected]>

Applied, thanks.

greg k-h

2005-02-01 08:01:42

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH] aoe: add documentation for udev users

On Thu, Jan 20, 2005 at 09:19:17AM -0500, Ed L Cashin wrote:
> Bodo Eggert <[email protected]> writes:
>
> > Ed L Cashin <[email protected]> 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 <[email protected]>

Applied, thanks.

greg k-h