aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2018-10-24 15:24:29 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2018-10-24 15:24:40 -0500
commite2416d089396e2b9a72cc56ef9f57886ffb0f1c8 (patch)
tree7f7ec33dc743c119c03aab3a577de4a75096b336 /src
parenta2bcfeb42882b40ca23ddfefca2a17a7988f8082 (diff)
openrc-shutdown: do not require a time for -w switch
X-Gentoo-Bug: 669500 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=669500
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;
}