Comment 10 for bug 9184

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Sat, 16 Oct 2004 15:23:05 +0100
From: Colin Watson <email address hidden>
To: Joshua Kwan <email address hidden>, <email address hidden>
Cc: Farzad FARID <email address hidden>
Subject: Re: Bug#276722: discover1: "set -e" prevents cdrom mountpoint creation

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 address hidden>]