diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-09-03 18:11:52 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-09-03 18:11:52 +0000 |
commit | d506e3349de8d747ad1756bc69d1ca302d8fd0f1 (patch) | |
tree | e5e800fe4354696f828ac2149909d120582ad6ef /sbin/reboot/reboot.c | |
parent | 0fea0dd47ea6070fd1755262432fd2fc46562ccd (diff) |
have shutdown code run /etc/rc with arg of "shutdown"; rc.shutdown becomes completely admin-editable
Diffstat (limited to 'sbin/reboot/reboot.c')
-rw-r--r-- | sbin/reboot/reboot.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sbin/reboot/reboot.c b/sbin/reboot/reboot.c index 68b25587365..d8e78ad3564 100644 --- a/sbin/reboot/reboot.c +++ b/sbin/reboot/reboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: reboot.c,v 1.16 1999/08/16 18:43:11 art Exp $ */ +/* $OpenBSD: reboot.c,v 1.17 1999/09/03 18:11:50 deraadt Exp $ */ /* $NetBSD: reboot.c,v 1.8 1995/10/05 05:36:22 mycroft Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)reboot.c 8.1 (Berkeley) 6/5/93"; #else -static char rcsid[] = "$OpenBSD: reboot.c,v 1.16 1999/08/16 18:43:11 art Exp $"; +static char rcsid[] = "$OpenBSD: reboot.c,v 1.17 1999/09/03 18:11:50 deraadt Exp $"; #endif #endif /* not lint */ @@ -67,7 +67,7 @@ static char rcsid[] = "$OpenBSD: reboot.c,v 1.16 1999/08/16 18:43:11 art Exp $"; void usage __P((void)); extern char *__progname; -#define _PATH_RCSHUTDOWN "/etc/rc.shutdown" +#define _PATH_RC "/etc/rc" int main(argc, argv) @@ -168,7 +168,7 @@ main(argc, argv) */ (void)signal(SIGPIPE, SIG_IGN); - if (access(_PATH_RCSHUTDOWN, R_OK) != -1) { + if (access(_PATH_RC, R_OK) != -1) { pid_t pid; struct termios t; int fd; @@ -195,7 +195,7 @@ main(argc, argv) t.c_oflag |= (ONLCR | OPOST); tcsetattr(0, TCSANOW, &t); - execl(_PATH_BSHELL, "sh", _PATH_RCSHUTDOWN, NULL); + execl(_PATH_BSHELL, "sh", _PATH_RC, "shutdown", NULL); _exit(1); default: waitpid(pid, NULL, 0); |