aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--man/openrc-shutdown.85
-rw-r--r--src/rc/openrc-shutdown.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/man/openrc-shutdown.8 b/man/openrc-shutdown.8
index eae16ae8..d0e95e24 100644
--- a/man/openrc-shutdown.8
+++ b/man/openrc-shutdown.8
@@ -8,7 +8,7 @@
.\" This file may not be copied, modified, propagated, or distributed
.\" except according to the terms contained in the LICENSE file.
.\"
-.Dd April 6, 2017
+.Dd May 22, 2017
.Dt openrc-shutdown 8 SMM
.Os OpenRC
.Sh NAME
@@ -40,6 +40,9 @@ upgrade of OpenRC if you are using openrc-init as your init process.
.It Fl r , -reboot
Stop all services, kill all processes and reboot the system.
.El
+.Pp
+If none of these options are given, the default is to move the system
+into single user mode.
.Sh SEE ALSO
.Xr openrc-init 8 ,
.Xr kexec 8 ,
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;
}