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 Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/886333 Title: invoke-rc.d mishandles runlevels 0 and 6 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/sysvinit/+bug/886333/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs