aboutsummaryrefslogtreecommitdiff
path: root/src/rc/openrc-init.c
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2017-06-02 14:07:40 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2017-06-04 20:56:03 -0500
commit7689106aa10f7852b707b4c21ec080ccb2767280 (patch)
treeaa096eed9381d48b8f9e51d54483043a46488845 /src/rc/openrc-init.c
parent1564e155b726308200ecd5df315c002bd8b16952 (diff)
add support for writing reboot and shutdown records to wtmp
Diffstat (limited to 'src/rc/openrc-init.c')
-rw-r--r--src/rc/openrc-init.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rc/openrc-init.c b/src/rc/openrc-init.c
index 003ce31f..eb346f59 100644
--- a/src/rc/openrc-init.c
+++ b/src/rc/openrc-init.c
@@ -32,6 +32,7 @@
#include "helpers.h"
#include "rc.h"
+#include "rc-wtmp.h"
#include "version.h"
static const char *rc_default_runlevel = "default";
@@ -82,6 +83,7 @@ static void init(const char *default_runlevel)
}
pid = do_openrc(runlevel);
waitpid(pid, NULL, 0);
+ log_wtmp("reboot", "~~", 0, RUN_LVL, "~~");
}
static void handle_reexec(char *my_name)