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.
This commit is contained in:
1 parent
a77ee2e941
commit
0cfd0dd9ef
2 files changed
+7
-2
No files matched your search
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user