On Thu, May 30, 2013 at 11:36:42PM +0200, Vincent Bernat wrote: > ❦ 30 mai 2013 23:07 CEST, Steve Langasek <vor...@debian.org> :
> >> . /lib/lsb/init-functions > >> (Which should be near the top of your init script already.) > >> This will automagically invoke systemd or upstart if appropriate. > > No, it won't. What it will do is provide a shell function you can call to > > check if init is upstart, and if so, neuter your init script: > > if init_is_upstart; then > > exit 1 > > fi > > Doing this automatically by including /lib/lsb/init-functions would be EBW. > What does EBW means? Having the upstart job masks automatically the SysV > init script would be convenient. It works fine for systemd. Evil, Bad, Wrong. Shell libraries (or any libraries) shouldn't call 'exit' for you. Upstart jobs do mask init scripts of the same name, at the startpar/insserv level - and also in invoke-rc.d (for maintainer scripts) and service (for admins). Having /lib/lsb/init-functions also pass through to upstart would be possible, but I don't think it's desirable - and it's not what's currently implemented. -- 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/ slanga...@ubuntu.com vor...@debian.org
signature.asc
Description: Digital signature