From 0432758e6b59676565e504d8e96aa1f204b26130 Mon Sep 17 00:00:00 2001 From: charnier Date: Mon, 3 Aug 1998 06:22:43 +0000 Subject: Correct use of .Nm. Add rcsid. Do not dot terminate err(3) strings. Spelling. --- sbin/shutdown/shutdown.8 | 17 +++++++++-------- sbin/shutdown/shutdown.c | 19 ++++++++++--------- 2 files changed, 19 insertions(+), 17 deletions(-) (limited to 'sbin/shutdown') diff --git a/sbin/shutdown/shutdown.8 b/sbin/shutdown/shutdown.8 index 00be465..0d40c1c 100644 --- a/sbin/shutdown/shutdown.8 +++ b/sbin/shutdown/shutdown.8 @@ -30,6 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)shutdown.8 8.1 (Berkeley) 6/5/93 +.\" $Id$ .\" .Dd June 5, 1993 .Dt SHUTDOWN 8 @@ -50,14 +51,14 @@ to nicely notify users when the system is shutting down, saving them from system administrators, hackers, and gurus, who would otherwise not bother with such niceties. .Pp -Available friendlinesses: -.Bl -tag -width time +The following options are available: +.Bl -tag -width indent .It Fl h The system is halted at the specified .Ar time when -.Nm shutdown -execs +.Nm +executes .Xr halt 8 . .It Fl k Kick every body off. @@ -72,14 +73,14 @@ Prevent the normal before stopping. .It Fl r .Nm Shutdown -execs +executes .Xr reboot 8 at the specified .Ar time . .It Ar time .Ar Time is the time at which -.Nm shutdown +.Nm will bring the system down and may be the word .Ar now @@ -114,14 +115,14 @@ log in, .Xr login 1 prints its contents and exits. The file is removed just before -.Nm shutdown +.Nm exits. .Pp At shutdown time a message is written in the system log, containing the time of shutdown, who initiated the shutdown and the reason. A terminate signal is then sent to -.Xr init +.Xr init 8 to bring the system down to single-user state (depending on above options). The time of the shutdown and the warning message diff --git a/sbin/shutdown/shutdown.c b/sbin/shutdown/shutdown.c index 11911b0..025a1c6 100644 --- a/sbin/shutdown/shutdown.c +++ b/sbin/shutdown/shutdown.c @@ -29,18 +29,20 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $Id: shutdown.c,v 1.11 1998/01/08 20:05:45 alex Exp $ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1988, 1990, 1993\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint +#if 0 static char sccsid[] = "@(#)shutdown.c 8.2 (Berkeley) 2/16/94"; +#endif +static const char rcsid[] = + "$Id$"; #endif /* not lint */ #include @@ -49,6 +51,7 @@ static char sccsid[] = "@(#)shutdown.c 8.2 (Berkeley) 2/16/94"; #include #include +#include #include #include #include @@ -57,7 +60,6 @@ static char sccsid[] = "@(#)shutdown.c 8.2 (Berkeley) 2/16/94"; #include #include #include -#include #include "pathnames.h" @@ -109,7 +111,6 @@ main(argc, argv) int argc; char *argv[]; { - extern int optind; register char *p, *endp; struct passwd *pw; int arglen, ch, len, readstdin; @@ -148,7 +149,7 @@ main(argc, argv) usage(); if (doreboot && dohalt) { - warnx("incompatible switches -h and -r."); + warnx("incompatible switches -h and -r"); usage(); } getoffset(*argv++); @@ -208,7 +209,7 @@ main(argc, argv) #endif openlog("shutdown", LOG_CONS, LOG_AUTH); loop(); - /* NOTREACHED */ + return(0); } void @@ -301,7 +302,7 @@ timewarn(timeleft) /* * play some games, just in case wall doesn't come back - * probably unecessary, given that wall is careful. + * probably unnecessary, given that wall is careful. */ if (!setjmp(alarmbuf)) { (void)signal(SIGALRM, timeout); @@ -474,7 +475,7 @@ finish(signo) void badtime() { - errx(1, "bad time format."); + errx(1, "bad time format"); } void -- cgit v1.1