mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 10:19:26 +00:00
Correct use of .Nm. Add rcsid. Do not dot terminate err(3) strings. Spelling.
This commit is contained in:
parent
bd48897bd1
commit
d371486332
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=38036
@ -30,6 +30,7 @@
|
|||||||
.\" SUCH DAMAGE.
|
.\" SUCH DAMAGE.
|
||||||
.\"
|
.\"
|
||||||
.\" @(#)shutdown.8 8.1 (Berkeley) 6/5/93
|
.\" @(#)shutdown.8 8.1 (Berkeley) 6/5/93
|
||||||
|
.\" $Id$
|
||||||
.\"
|
.\"
|
||||||
.Dd June 5, 1993
|
.Dd June 5, 1993
|
||||||
.Dt SHUTDOWN 8
|
.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
|
saving them from system administrators, hackers, and gurus, who
|
||||||
would otherwise not bother with such niceties.
|
would otherwise not bother with such niceties.
|
||||||
.Pp
|
.Pp
|
||||||
Available friendlinesses:
|
The following options are available:
|
||||||
.Bl -tag -width time
|
.Bl -tag -width indent
|
||||||
.It Fl h
|
.It Fl h
|
||||||
The system is halted at the specified
|
The system is halted at the specified
|
||||||
.Ar time
|
.Ar time
|
||||||
when
|
when
|
||||||
.Nm shutdown
|
.Nm
|
||||||
execs
|
executes
|
||||||
.Xr halt 8 .
|
.Xr halt 8 .
|
||||||
.It Fl k
|
.It Fl k
|
||||||
Kick every body off.
|
Kick every body off.
|
||||||
@ -72,14 +73,14 @@ Prevent the normal
|
|||||||
before stopping.
|
before stopping.
|
||||||
.It Fl r
|
.It Fl r
|
||||||
.Nm Shutdown
|
.Nm Shutdown
|
||||||
execs
|
executes
|
||||||
.Xr reboot 8
|
.Xr reboot 8
|
||||||
at the specified
|
at the specified
|
||||||
.Ar time .
|
.Ar time .
|
||||||
.It Ar time
|
.It Ar time
|
||||||
.Ar Time
|
.Ar Time
|
||||||
is the time at which
|
is the time at which
|
||||||
.Nm shutdown
|
.Nm
|
||||||
will bring the system down and
|
will bring the system down and
|
||||||
may be the word
|
may be the word
|
||||||
.Ar now
|
.Ar now
|
||||||
@ -114,14 +115,14 @@ log in,
|
|||||||
.Xr login 1
|
.Xr login 1
|
||||||
prints its contents and exits. The file is
|
prints its contents and exits. The file is
|
||||||
removed just before
|
removed just before
|
||||||
.Nm shutdown
|
.Nm
|
||||||
exits.
|
exits.
|
||||||
.Pp
|
.Pp
|
||||||
At shutdown time a message is written in the system log, containing the
|
At shutdown time a message is written in the system log, containing the
|
||||||
time of shutdown, who initiated the shutdown and the reason.
|
time of shutdown, who initiated the shutdown and the reason.
|
||||||
A terminate
|
A terminate
|
||||||
signal is then sent to
|
signal is then sent to
|
||||||
.Xr init
|
.Xr init 8
|
||||||
to bring the system down to single-user state (depending on above
|
to bring the system down to single-user state (depending on above
|
||||||
options).
|
options).
|
||||||
The time of the shutdown and the warning message
|
The time of the shutdown and the warning message
|
||||||
|
@ -29,18 +29,20 @@
|
|||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
* 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
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
|
||||||
* $Id: shutdown.c,v 1.11 1998/01/08 20:05:45 alex Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static const char copyright[] =
|
||||||
"@(#) Copyright (c) 1988, 1990, 1993\n\
|
"@(#) Copyright (c) 1988, 1990, 1993\n\
|
||||||
The Regents of the University of California. All rights reserved.\n";
|
The Regents of the University of California. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
|
#if 0
|
||||||
static char sccsid[] = "@(#)shutdown.c 8.2 (Berkeley) 2/16/94";
|
static char sccsid[] = "@(#)shutdown.c 8.2 (Berkeley) 2/16/94";
|
||||||
|
#endif
|
||||||
|
static const char rcsid[] =
|
||||||
|
"$Id$";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@ -49,6 +51,7 @@ static char sccsid[] = "@(#)shutdown.c 8.2 (Berkeley) 2/16/94";
|
|||||||
#include <sys/syslog.h>
|
#include <sys/syslog.h>
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include <err.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
@ -57,7 +60,6 @@ static char sccsid[] = "@(#)shutdown.c 8.2 (Berkeley) 2/16/94";
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <err.h>
|
|
||||||
|
|
||||||
#include "pathnames.h"
|
#include "pathnames.h"
|
||||||
|
|
||||||
@ -109,7 +111,6 @@ main(argc, argv)
|
|||||||
int argc;
|
int argc;
|
||||||
char *argv[];
|
char *argv[];
|
||||||
{
|
{
|
||||||
extern int optind;
|
|
||||||
register char *p, *endp;
|
register char *p, *endp;
|
||||||
struct passwd *pw;
|
struct passwd *pw;
|
||||||
int arglen, ch, len, readstdin;
|
int arglen, ch, len, readstdin;
|
||||||
@ -148,7 +149,7 @@ main(argc, argv)
|
|||||||
usage();
|
usage();
|
||||||
|
|
||||||
if (doreboot && dohalt) {
|
if (doreboot && dohalt) {
|
||||||
warnx("incompatible switches -h and -r.");
|
warnx("incompatible switches -h and -r");
|
||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
getoffset(*argv++);
|
getoffset(*argv++);
|
||||||
@ -208,7 +209,7 @@ main(argc, argv)
|
|||||||
#endif
|
#endif
|
||||||
openlog("shutdown", LOG_CONS, LOG_AUTH);
|
openlog("shutdown", LOG_CONS, LOG_AUTH);
|
||||||
loop();
|
loop();
|
||||||
/* NOTREACHED */
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -301,7 +302,7 @@ timewarn(timeleft)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* play some games, just in case wall doesn't come back
|
* 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)) {
|
if (!setjmp(alarmbuf)) {
|
||||||
(void)signal(SIGALRM, timeout);
|
(void)signal(SIGALRM, timeout);
|
||||||
@ -474,7 +475,7 @@ finish(signo)
|
|||||||
void
|
void
|
||||||
badtime()
|
badtime()
|
||||||
{
|
{
|
||||||
errx(1, "bad time format.");
|
errx(1, "bad time format");
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user