[Pkg-sysvinit-devel] Bug#397900: erroneous runlevel during boot-up sequence

martin f krafft madduck at debian.org
Fri Feb 2 13:40:40 CET 2007


also sprach Petter Reinholdtsen <pere at hungry.com> [2006.11.26.1755 +0000]:
> It fetches the info from utmp.  Perhaps that file have incorrect
> information in it?  I suspect runlevel 'S' isn't treated by init
> as a real runlevel, and this make who and runlevel believe the
> current runlevel is the runlevel used before the last reboot, aka
> runlevel 6.
> 
> Any ideas how we can change this to return more sensible values?
> It is hard to write to utmp at the start of the rcS.d/ run, as
> /var/log/utmp isn't writable (and perhaps not even available) at
> that time in the boot.

I can't help but think that a simple hack like

  switch (prev_runtime) {
    case 0: case 6: prev_runtime = 'N'; break;
    default: break;
  }

would solve the problem.

-- 
 .''`.   martin f. krafft <madduck at debian.org>
: :'  :  proud Debian developer, author, administrator, and user
`. `'`   http://people.debian.org/~madduck - http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature (GPG/PGP)
Url : http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/attachments/20070202/b9347b24/attachment.pgp


More information about the Pkg-sysvinit-devel mailing list