diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2018-10-24 15:24:29 -0500 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2018-10-24 15:24:40 -0500 |
commit | e2416d089396e2b9a72cc56ef9f57886ffb0f1c8 (patch) | |
tree | 7f7ec33dc743c119c03aab3a577de4a75096b336 | |
parent | a2bcfeb42882b40ca23ddfefca2a17a7988f8082 (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
-rw-r--r-- | src/rc/openrc-shutdown.c | 5 |
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; } |