aboutsummaryrefslogtreecommitdiff
path: root/src/sysvinit.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2013-01-05 11:56:51 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2013-01-05 11:56:51 +0200
commit4f7c28158308563dcad912d87a0031d095d4690a (patch)
treef8badf11119135268fb58b77e86667b12d0f090c /src/sysvinit.c
parentd8221ce9bdd2d7ae6162bed0e1c85e9f7a3ff8f2 (diff)
downloadpies-4f7c28158308563dcad912d87a0031d095d4690a.tar.gz
pies-4f7c28158308563dcad912d87a0031d095d4690a.tar.bz2
Write utmp/wtmp records in sysvinit mode.
* configure.ac: Check for utmp.h, utmpx.h * src/utmp.c: New file. * src/Makefile.am: Add utmp.c * src/pies.h (sysvinit_acct): New proto. * src/progman.c (prog_start, progman_cleanup): Call sysvinit_acct. * src/sysvinit.c (inittrans): Call sysvinit_acct. Set proctitle.
Diffstat (limited to 'src/sysvinit.c')
-rw-r--r--src/sysvinit.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sysvinit.c b/src/sysvinit.c
index 5a0d98a..ef765a1 100644
--- a/src/sysvinit.c
+++ b/src/sysvinit.c
@@ -165,7 +165,9 @@ inittrans ()
switch (boot_state)
{
case sysinit:
+ break;
case boot:
+ sysvinit_acct (SYSV_ACCT_BOOT, "reboot", "~~", 0, "~");
break;
case single0:
case single1:
@@ -178,6 +180,9 @@ inittrans ()
if (newlevel && newlevel != runlevel)
{
debug (1, ("RL TRANS: %c -> %c", runlevel, newlevel));
+ sysvinit_acct (SYSV_ACCT_RUNLEVEL, "runlevel", "~~",
+ newlevel + 256 * runlevel, "~");
+ mf_proctitle_format ("init [%c]", newlevel);
runlevel = newlevel;
trans = 1;
wait = 0;

Return to:

Send suggestions and report system problems to the System administrator.