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

Steve Langasek <[email protected]>
Newsgroups gmane.linux.debian.devel.lsb
Message-ID <20120502204828.GA4855__41889.7986681715$1335992633$gmane$org@virgil.dodds.net>
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/
[email protected]                                     [email protected]
signature.asc (application/pgp-signature, 828 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIVAwUBT6GdnFaNMPMhshM9AQiW9hAAoLSyPHQAIlehRu+bA0soo3BjwSXBhEo7
HQolSGxO0kVZrlx/BzOy54tClfNQFP9NVNaJQIhB9uykkSB5K5V2MaSTswDJjsbK
+QDonBKYuHDdgYeuu7YkuGneNGeoQR43GIcoI/gd4xFt8O65TaQu9+KyJZ7YJWU6
nvb+bbE4aJ2zJjEST9Z2Tq99fC8FEcC+FnpJ97aAahtxW3bNTLP024zjScStJqyQ
JsFvGfNTSoUkk6W6YoOIzwS+6UViAYJp+5aG267GIXCK8K0+2oqY2NX/S931unM3
SSLmFdY+6NRENKRL6XWstYS0p8/Z52Ol4MaAzEUlcbl4V7LNm+Us21te89evqoyn
XdO8zBEfxfvITs7Zn9hfE7s//8N9wRW6gBXRAFtNpiR5D1S5ie6oSEFfdDLswO8Y
Od5SZtXy6hLy2C6YW9Q5O8ebtn2dMmRvmGDn3tnGZUI4Zrt0wq2wg4PB8ZQkGb1q
37UAMAnVGdA5OGyYTAdgBfHfs9++aVOZTIBfM14h++sMMm8SUGla9T6l5RWIK8C4
aqBhQMVyGlX8+Ls/jAavsH/ChwePQa4VRPCCXi7m5N4xHSu6uqjjrav3XdyRvXyM
1vzdu9XcpAIrXy0QahVHNRBDxdweu8EQWzUh9A+wT+C9xmStowrlCAyFMlPg7fit
rGpWByINGMY=
=ezUL
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.