[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#661109: lsb: Please include helper function for init scripts on upstart-based systems



On Wed, May 02, 2012 at 09:35:34AM +0200, Didier 'OdyX' Raboud wrote:
> Le 02.05.2012 08:55, Steve Langasek a écrit :
> > BTW, I'm sorry to say I've just noticed the patch I sent has a bug; the
> > output of 'which initctl' should be suppressed, otherwise each init script
> > using this function will output "/sbin/initctl" which we don't want.

> > So the line should be:

> >    if which initctl >/dev/null && initctl version | grep -q upstart

> Good catch. That said, wouldn't the following be more robust ?

> if [ -x /sbin/initctl ] && /sbin/initctl version | /bin/grep -q upstart

> In init-functions, no PATH is defined (all executables are currently
> called with full paths). And only upstart ships /sbin/initctl, right?

If that's the convention in lsb-functions, sure, I'm ok with that.  In
general, packages are safe to assume a sane path - dpkg itself won't work
unless /usr/sbin is on the path, for instance.  But it's fine to make this
consistent with the rest of the 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/
slangasek@ubuntu.com                                     vorlon@debian.org

Attachment: signature.asc
Description: Digital signature


Reply to: