Simple fix in redo_utmp_wtmp() function: in test function currently is check the same value:
if ((wrote_wtmp_rlevel == 0) || (wrote_*wtmp*_rlevel == 0)) Changed to: if ((wrote_wtmp_rlevel == 0) || (wrote_*utmp*_rlevel == 0)) ========================== --- init.c-orig 2014-02-10 21:15:58.950073035 +0100 +++ init.c 2014-02-10 21:17:07.274074658 +0100 @@ -2185,7 +2185,7 @@ if ((wrote_wtmp_reboot == 0) || (wrote_utmp_reboot == 0)) write_utmp_wtmp("reboot", "~~", 0, BOOT_TIME, "~"); - if ((wrote_wtmp_rlevel == 0) || (wrote_wtmp_rlevel == 0)) + if ((wrote_wtmp_rlevel == 0) || (wrote_utmp_rlevel == 0)) write_utmp_wtmp("runlevel", "~~", thislevel + 256 * prevlevel, RUN_LVL, "~"); } -- Michal Kulling
--- init.c-orig 2014-02-10 21:15:58.950073035 +0100 +++ init.c 2014-02-10 21:17:07.274074658 +0100 @@ -2185,7 +2185,7 @@ if ((wrote_wtmp_reboot == 0) || (wrote_utmp_reboot == 0)) write_utmp_wtmp("reboot", "~~", 0, BOOT_TIME, "~"); - if ((wrote_wtmp_rlevel == 0) || (wrote_wtmp_rlevel == 0)) + if ((wrote_wtmp_rlevel == 0) || (wrote_utmp_rlevel == 0)) write_utmp_wtmp("runlevel", "~~", thislevel + 256 * prevlevel, RUN_LVL, "~"); }