[Bug 886333] [NEW] invoke-rc.d mishandles runlevels 0 and 6
Phillip Susi
psusi at cfl.rr.com
Fri Nov 4 20:30:08 UTC 2011
Public bug reported:
invoke-rc.d checks the current runlevel to make sure not to start a
daemon that is not supposed to run in this runlevel. If you set the
runlevel to 0 or 6 ( by setting the RUNLEVEL environment variable ), it
has a special clause that bypasses all checks and starts/stops the
daemon as told anyhow. This clause should only apply to stopping the
daemon, not starting it.
To reproduce the error, run RUNLEVEL=0 invoke-rc.d somedaemon start
The relevant section in the script is:
## Handles shutdown sequences VERY safely
## i.e.: forget about policy, and do all we can to run the script.
## BTW, why the heck are we being run in a shutdown runlevel?!
if test x${RL} = x0 || test x${RL} = x6 ; then
FORCE=yes
RETRY=yes
POLICYHELPER=
BEQUIET=
printerror "-----------------------------------------------------"
printerror "WARNING: 'invoke-rc.d ${INITSCRIPTID} ${ACTION}' called"
printerror "during shutdown sequence."
printerror "enabling safe mode: initscript policy layer disabled"
printerror "-----------------------------------------------------"
fi
** Affects: sysvinit (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to sysvinit in Ubuntu.
https://bugs.launchpad.net/bugs/886333
Title:
invoke-rc.d mishandles runlevels 0 and 6
Status in “sysvinit” package in Ubuntu:
New
Bug description:
invoke-rc.d checks the current runlevel to make sure not to start a
daemon that is not supposed to run in this runlevel. If you set the
runlevel to 0 or 6 ( by setting the RUNLEVEL environment variable ),
it has a special clause that bypasses all checks and starts/stops the
daemon as told anyhow. This clause should only apply to stopping the
daemon, not starting it.
To reproduce the error, run RUNLEVEL=0 invoke-rc.d somedaemon start
The relevant section in the script is:
## Handles shutdown sequences VERY safely
## i.e.: forget about policy, and do all we can to run the script.
## BTW, why the heck are we being run in a shutdown runlevel?!
if test x${RL} = x0 || test x${RL} = x6 ; then
FORCE=yes
RETRY=yes
POLICYHELPER=
BEQUIET=
printerror "-----------------------------------------------------"
printerror "WARNING: 'invoke-rc.d ${INITSCRIPTID} ${ACTION}' called"
printerror "during shutdown sequence."
printerror "enabling safe mode: initscript policy layer disabled"
printerror "-----------------------------------------------------"
fi
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sysvinit/+bug/886333/+subscriptions
More information about the foundations-bugs
mailing list