From e2416d089396e2b9a72cc56ef9f57886ffb0f1c8 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Wed, 24 Oct 2018 15:24:29 -0500 Subject: 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(-) (limited to 'src/rc') 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; } -- cgit v1.2.3