aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rc/openrc-shutdown.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rc/openrc-shutdown.c b/src/rc/openrc-shutdown.c
index ab2e7469..71a91255 100644
--- a/src/rc/openrc-shutdown.c
+++ b/src/rc/openrc-shutdown.c
@@ -250,6 +250,9 @@ int main(int argc, char **argv)
} else if (do_reexec) {
send_cmd("reexec");
exit(EXIT_SUCCESS);
+ } else if (do_wtmp_only) {
+ log_wtmp("shutdown", "~~", 0, RUN_LVL, "~~");
+ exit(EXIT_SUCCESS);
}
if (optind >= argc) {
@@ -329,7 +332,5 @@ int main(int argc, char **argv)
send_cmd("reboot");
else if (do_single)
send_cmd("single");
- else if (do_wtmp_only)
- log_wtmp("shutdown", "~~", 0, RUN_LVL, "~~");
return 0;
}