commit:     e2416d089396e2b9a72cc56ef9f57886ffb0f1c8
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Wed Oct 24 20:24:29 2018 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Wed Oct 24 20:24:40 2018 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=e2416d08

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

 src/rc/openrc-shutdown.c | 5 +++--
 1 file 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;
 }

Reply via email to