diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2017-05-22 12:15:15 -0500 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2017-05-22 12:15:15 -0500 |
commit | 0cfd0dd9ef580ed9dc563ccc164d70efe8f299db (patch) | |
tree | 6485f3a880d4b7d906419ec680069e2ac8ce63a7 /src/rc | |
parent | a77ee2e94191ba1a286b8a6835f76556481566ba (diff) |
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.
Diffstat (limited to 'src/rc')
-rw-r--r-- | src/rc/openrc-shutdown.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; } |