On Sat, Oct 31, 2009 at 12:40:46PM -0000, Martin Pitt wrote: > Mathias Gug [2009-10-30 21:52 -0000]: > > -exec avahi-daemon -D > > +script > > + opts="-D" > > + [ -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 $
> But even more, if /etc/eucalyptus/avahi-daemon.conf does > not exist, you need to drop -D entirely (to use the default file). So > I think you want
> > -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:
script conf=-D [ -e "/etc/eucalyptus/avahi-daemon.conf" ] && conf="-f /etc/eucalyptus/avahi-daemon.conf" exec avahi-daemon $conf end script
?
-- 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>
On Sat, Oct 31, 2009 at 12:40:46PM -0000, Martin Pitt wrote: s/avahi- daemon. conf" ] && opts="${opts} -f /etc/eucalyptus /avahi- daemon. conf"
> Mathias Gug [2009-10-30 21:52 -0000]:
> > -exec avahi-daemon -D
> > +script
> > + opts="-D"
> > + [ -e "/etc/eucalyptu
> Upstart scripts are "set -e" by default, so you are missing an "||
> true" here.
$ set -e s/avahi- daemon. conf" ] && opts="${opts} -f /etc/eucalyptus /avahi- daemon. conf"
$ [ -e "/etc/eucalyptu
$ echo $?
1
$
> But even more, if /etc/eucalyptus /avahi- daemon. conf does
> not exist, you need to drop -D entirely (to use the default file). So
> I think you want
> > -exec avahi-daemon -D s/avahi- daemon. conf" ] && conf="-f /etc/eucalyptus /avahi- daemon. conf" || :
> > + [ -e "/etc/eucalyptu
> > + exec avahi-daemon -D $conf
> > +end script
That doesn't appear to drop the -D at all? I guess maybe you mean:
script s/avahi- daemon. conf" ] && conf="-f /etc/eucalyptus /avahi- daemon. conf"
conf=-D
[ -e "/etc/eucalyptu
exec avahi-daemon $conf
end script
?
-- www.debian. org/
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://
<email address hidden> <email address hidden>