On Fri, Oct 15, 2004 at 11:00:13PM -0700, Joshua Kwan wrote:
> On Fri, Oct 15, 2004 at 11:56:16PM +0200, Farzad FARID wrote:
> > On my freshly installed Debian unstable, /etc/init.d/discover fails to
> > create the symlinks in /dev and /media. I trace this down with "sh -x
> > /etc/init.d/discover start" and found out that the script stopped on
> > an error while grepping /proc/mounts, therefore never finishing its
> > job.
> 
> Add set -e back, and does changing this line:
> 
>         mountsent="$(grep " $CDMOUNT " /proc/mounts)"
> 
> to either
> 
>               mountsent=$(grep " $CDMOUNT " /proc/mounts)
> 
> or
> 
>               mountsent=$(grep " $CDMOUNT " /proc/mounts || true)

In either case, removing quoting is surely the wrong answer. I'd do one
of these:

  mountsent="$(grep " $CDMOUNT " /proc/mounts || true)"
  mountsent="$(grep " $CDMOUNT " /proc/mounts)" || true

-- 
Colin Watson                                       [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to