From 0cfd0dd9ef580ed9dc563ccc164d70efe8f299db Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Mon, 22 May 2017 12:15:15 -0500 Subject: openrc-shutdown: move to single user mode by default To be more compatible with sysvinit, move to single user mode if no options are specified on the command line. --- src/rc/openrc-shutdown.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/rc/openrc-shutdown.c b/src/rc/openrc-shutdown.c index 8905d354..0ed77445 100644 --- a/src/rc/openrc-shutdown.c +++ b/src/rc/openrc-shutdown.c @@ -114,7 +114,7 @@ if (geteuid() != 0) case_RC_COMMON_GETOPT } } - if (cmd_count != 1) { + if (cmd_count > 1) { eerror("%s: %s\n", applet, exclusive); usage(EXIT_FAILURE); } @@ -128,5 +128,7 @@ if (geteuid() != 0) send_cmd("reboot"); else if (do_reexec) send_cmd("reexec"); + else + send_cmd("single"); return 0; } -- cgit v1.2.3