summaryrefslogtreecommitdiffstats
path: root/sbin/init
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>1999-11-22 04:23:11 +0000
committerdillon <dillon@FreeBSD.org>1999-11-22 04:23:11 +0000
commite8e6885c6b0dee9c5ecf9f433c1eeac5cc116a51 (patch)
treedb8aaaa6673d31f85b8712d63eb284e6fb9ce007 /sbin/init
parentdadd809c39e5c694c3b2ecf910e3b181cea21530 (diff)
downloadFreeBSD-src-e8e6885c6b0dee9c5ecf9f433c1eeac5cc116a51.zip
FreeBSD-src-e8e6885c6b0dee9c5ecf9f433c1eeac5cc116a51.tar.gz
Finish up umntall support. init now passed an argument to the
rundown script 'reboot' or 'single'. ISO support (which never worked) has been removed from mount_nfs. mount_nfs and umount now use mounttab, which allows umntall to work properly. The rc scripts now call umntall as appropriate. Submitted by: Martin Blapp <mb@imp.ch>
Diffstat (limited to 'sbin/init')
-rw-r--r--sbin/init/init.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sbin/init/init.c b/sbin/init/init.c
index 75287b5..30453a9 100644
--- a/sbin/init/init.c
+++ b/sbin/init/init.c
@@ -646,7 +646,8 @@ single_user()
*/
typ = getttynam("console");
pp = getpwnam("root");
- if (typ && (typ->ty_status & TTY_SECURE) == 0 && pp && *pp->pw_passwd) {
+ if (typ && (typ->ty_status & TTY_SECURE) == 0 &&
+ pp && *pp->pw_passwd) {
write(2, banner, sizeof banner - 1);
for (;;) {
clear = getpass("Password:");
@@ -1488,7 +1489,7 @@ runshutdown()
int status;
int shutdowntimeout;
size_t len;
- char *argv[3];
+ char *argv[4];
struct sigaction sa;
struct stat sb;
@@ -1527,7 +1528,11 @@ runshutdown()
*/
argv[0] = "sh";
argv[1] = _PATH_RUNDOWN;
- argv[2] = 0;
+ if (Reboot)
+ argv[2] = "reboot";
+ else
+ argv[2] = "single";
+ argv[3] = 0;
sigprocmask(SIG_SETMASK, &sa.sa_mask, (sigset_t *) 0);
OpenPOWER on IntegriCloud