Correct use of .Nm. Add rcsid. Do not dot terminate err(3) strings. Spelling.

This commit is contained in:
Philippe Charnier 1998-08-03 06:22:43 +00:00
parent bd48897bd1
commit d371486332
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=38036
2 changed files with 19 additions and 17 deletions

View File

@ -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

View File

@ -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 <sys/param.h>
@ -49,6 +51,7 @@ static char sccsid[] = "@(#)shutdown.c 8.2 (Berkeley) 2/16/94";
#include <sys/syslog.h>
#include <ctype.h>
#include <err.h>
#include <fcntl.h>
#include <pwd.h>
#include <setjmp.h>
@ -57,7 +60,6 @@ static char sccsid[] = "@(#)shutdown.c 8.2 (Berkeley) 2/16/94";
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <err.h>
#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