invoke-rc.d don't return same anwswer when the variable RUNLEVEL is setup at boot time
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sysvinit (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Lucid |
Fix Released
|
Undecided
|
Dave Walker |
Bug Description
Binary package hint: sysvinit
IMPACT: puppet tool uses invoke-rc.d to determine if a service is launched at boot time. But at boot time, a variable RUNLEVEL is setup and invoke-rc.d doesn't work after that.
FIX: have invoke-rc.d to use 'RUNLEVELHELPER' as the variable name for the full path to the runlevel(8) binary instead of 'RUNLEVEL'.
PATCH: See comment #3, or diff for (2.87dsf-4ubuntu24) oneiric.
REPRODUCE:
RUNLEVEL=2 bash -x /usr/sbin/
-> we can see an exit 105
but :
bash -x /usr/sbin/
-> we can see an exit 104 (the good answer)
With debian lenny :
RUNLEVEL=2 bash -x /usr/sbin/
-> we can see an exit 104
DISCUSSION: Regression potential is low, it is a back-ported fix from oneiric. This fix is currently in production use on some Canonical Lucid servers.
description: | updated |
Changed in sysvinit (Ubuntu Lucid): | |
status: | New → Confirmed |
assignee: | nobody → Dave Walker (davewalker) |
description: | updated |
I can confirm this bug. I've also confirmed that the bug doesn't exist in jaunty, so is definitely new (since switch to upstart?). This probably affects other services besides puppet, since invoke-rc.d is supposed to be the interface to sysv init. From the debian policy manual:
> 9.3.3 Interfacing with the initscript system
> Maintainers should use the abstraction layer provided by the update-rc.d and invoke-rc.d programs to deal
> with initscripts in their packages' scripts such as postinst, prerm and postrm.
> Directly managing the /etc/rc?.d links and directly invoking the /etc/init.d/ initscripts should be done only
> by packages providing the initscript subsystem (such as sysv-rc and file-rc).