So the problem is that running "rc 6" when the "current runlevel" (as
determined by /var/run/utmp) is 6 does nothing.

The same bug would occur if you put "shutdown -h now" inside /etc/rc0.d,
it would cancel the running shutdown, and then do nothing.

sysvinit handles this simply by not allowing a change from to the same
runlevel as the current one.  We could replicate that fix by making
shutdown (and telinit) check the runlevel first -- currently they just
send the event regardless.

There's another semi-bug here, if you press Ctrl-Alt-Del while "shutdown
-h now" (not -r) is running, then the flip is from runlevel 0 to
runlevel 6; this is something sysvinit allows -- and responds badly to.
sysv-rc skips everything except the final S90reboot script because
everything else exists in the previous runlevel.

upstart exhibits the same behaviour in that circumstance.

-- 
Ctl+Alt+Del twice at tty console login gives root access
https://launchpad.net/bugs/63852

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to