Comment 23 for bug 458904

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 458904] Re: When installing a node, euca_find_cluster fails to locate the cluster controller if instances are running

On Mon, Nov 02, 2009 at 12:13:28PM -0000, Martin Pitt wrote:
> Steve Langasek [2009-11-02 11:06 -0000]:
> > > > + [ -e "/etc/eucalyptus/avahi-daemon.conf" ] && opts="${opts} -f /etc/eucalyptus/avahi-daemon.conf"
> >
> > > Upstart scripts are "set -e" by default, so you are missing an "||
> > > true" here.

> > $ set -e
> > $ [ -e "/etc/eucalyptus/avahi-daemon.conf" ] && opts="${opts} -f /etc/eucalyptus/avahi-daemon.conf"
> > $ echo $?
> > 1

> (thanks for the confirmation)

That's not a confirmation, I'm demonstrating that checking the return value
with '&&' is sufficient to prevent the shell from exiting under set -e. So
no '|| true' is needed.

> > > > -exec avahi-daemon -D
> > > > + [ -e "/etc/eucalyptus/avahi-daemon.conf" ] && conf="-f /etc/eucalyptus/avahi-daemon.conf" || :
> > > > + exec avahi-daemon -D $conf
> > > > +end script

> > That doesn't appear to drop the -D at all? I guess maybe you mean:

> No, it shouldn't. -D means "daemonize", and this should always be
> done. What we want to do is to add -f /my/different/conffile.

Ok, then I guess I misunderstood what you meant when you said

> if /etc/eucalyptus/avahi-daemon.conf does not exist, you need to drop
> -D entirely (to use the default file).

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
<email address hidden> <email address hidden>