summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/shutdown/shutdown.89
-rw-r--r--sbin/shutdown/shutdown.c11
2 files changed, 13 insertions, 7 deletions
diff --git a/sbin/shutdown/shutdown.8 b/sbin/shutdown/shutdown.8
index 017e24487b0..9b597f4a0ac 100644
--- a/sbin/shutdown/shutdown.8
+++ b/sbin/shutdown/shutdown.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: shutdown.8,v 1.15 1999/10/07 06:01:59 ericj Exp $
+.\" $OpenBSD: shutdown.8,v 1.16 2000/01/15 07:00:43 ericj Exp $
.\" $NetBSD: shutdown.8,v 1.6 1995/03/18 15:01:07 cgd Exp $
.\"
.\" Copyright (c) 1988, 1991, 1993
@@ -158,12 +158,17 @@ tells login not to let anyone log in
tells
.Xr rc 8
not to run fsck when rebooting
+.It Pa /etc/rc.shutdown
+Run by
+.Xr rc 8
+before the system is shutdown.
.El
.Sh SEE ALSO
.Xr login 1 ,
.Xr wall 1 ,
.Xr halt 8 ,
-.Xr reboot 8
+.Xr reboot 8 ,
+.Xr rc.shutdown 8
.Sh BACKWARD COMPATIBILITY
The hours and minutes in the second time format may be separated by
a colon
diff --git a/sbin/shutdown/shutdown.c b/sbin/shutdown/shutdown.c
index 6ada099d0cd..7f5ff6605ab 100644
--- a/sbin/shutdown/shutdown.c
+++ b/sbin/shutdown/shutdown.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: shutdown.c,v 1.17 1999/09/03 18:11:51 deraadt Exp $ */
+/* $OpenBSD: shutdown.c,v 1.18 2000/01/15 07:00:43 ericj Exp $ */
/* $NetBSD: shutdown.c,v 1.9 1995/03/18 15:01:09 cgd Exp $ */
/*
@@ -44,14 +44,15 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)shutdown.c 8.2 (Berkeley) 2/16/94";
#else
-static char rcsid[] = "$OpenBSD: shutdown.c,v 1.17 1999/09/03 18:11:51 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: shutdown.c,v 1.18 2000/01/15 07:00:43 ericj Exp $";
#endif
#endif /* not lint */
#include <sys/param.h>
-#include <sys/time.h>
#include <sys/resource.h>
#include <sys/syslog.h>
+#include <sys/types.h>
+#include <sys/wait.h>
#include <ctype.h>
#include <fcntl.h>
@@ -62,6 +63,7 @@ static char rcsid[] = "$OpenBSD: shutdown.c,v 1.17 1999/09/03 18:11:51 deraadt E
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <time.h>
#include <tzfile.h>
#include <unistd.h>
#include <errno.h>
@@ -120,7 +122,6 @@ main(argc, argv)
int argc;
char *argv[];
{
- extern int optind;
register char *p, *endp;
struct passwd *pw;
int arglen, ch, len, readstdin;
@@ -572,6 +573,6 @@ badtime()
void
usage()
{
- fprintf(stderr, "usage: shutdown [-fhknpr] shutdowntime [ message ]\n");
+ fprintf(stderr, "usage: shutdown [-dfhknpr] shutdowntime [ message ]\n");
exit(1);
}