Yanked out (now obsolete) support for 'fastboot'.
This commit is contained in:
parent
2ee6a63f1f
commit
32e68582d1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=6443
@ -40,7 +40,7 @@
|
|||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.Nm shutdown
|
.Nm shutdown
|
||||||
.Op Fl
|
.Op Fl
|
||||||
.Op Fl fhkrn
|
.Op Fl hkrn
|
||||||
.Ar time
|
.Ar time
|
||||||
.Op Ar warning-message ...
|
.Op Ar warning-message ...
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
@ -52,13 +52,6 @@ would otherwise not bother with such niceties.
|
|||||||
.Pp
|
.Pp
|
||||||
Available friendlinesses:
|
Available friendlinesses:
|
||||||
.Bl -tag -width time
|
.Bl -tag -width time
|
||||||
.It Fl f
|
|
||||||
.Nm Shutdown
|
|
||||||
arranges, in the manner of
|
|
||||||
.Xr fastboot 8 ,
|
|
||||||
for the file systems
|
|
||||||
.Em not to be
|
|
||||||
checked on reboot.
|
|
||||||
.It Fl h
|
.It Fl h
|
||||||
The system is halted at the specified
|
The system is halted at the specified
|
||||||
.Ar time
|
.Ar time
|
||||||
@ -141,15 +134,10 @@ and why it is going down (or anything else).
|
|||||||
.Bl -tag -width /etc/nologin -compact
|
.Bl -tag -width /etc/nologin -compact
|
||||||
.It Pa /etc/nologin
|
.It Pa /etc/nologin
|
||||||
tells login not to let anyone log in
|
tells login not to let anyone log in
|
||||||
.It Pa /fastboot
|
|
||||||
tells
|
|
||||||
.Xr rc 8
|
|
||||||
not to run fsck when rebooting
|
|
||||||
.El
|
.El
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr login 1 ,
|
.Xr login 1 ,
|
||||||
.Xr wall 1 ,
|
.Xr wall 1 ,
|
||||||
.Xr fastboot 8 ,
|
|
||||||
.Xr halt 8 ,
|
.Xr halt 8 ,
|
||||||
.Xr reboot 8
|
.Xr reboot 8
|
||||||
.Sh BACKWARD COMPATIBILITY
|
.Sh BACKWARD COMPATIBILITY
|
||||||
|
@ -62,8 +62,6 @@ static char sccsid[] = "@(#)shutdown.c 8.2 (Berkeley) 2/16/94";
|
|||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
#undef _PATH_NOLOGIN
|
#undef _PATH_NOLOGIN
|
||||||
#define _PATH_NOLOGIN "./nologin"
|
#define _PATH_NOLOGIN "./nologin"
|
||||||
#undef _PATH_FASTBOOT
|
|
||||||
#define _PATH_FASTBOOT "./fastboot"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define H *60*60
|
#define H *60*60
|
||||||
@ -83,12 +81,11 @@ struct interval {
|
|||||||
#undef S
|
#undef S
|
||||||
|
|
||||||
static time_t offset, shuttime;
|
static time_t offset, shuttime;
|
||||||
static int dofast, dohalt, doreboot, killflg, mbuflen;
|
static int dohalt, doreboot, killflg, mbuflen;
|
||||||
static char *nosync, *whom, mbuf[BUFSIZ];
|
static char *nosync, *whom, mbuf[BUFSIZ];
|
||||||
|
|
||||||
void badtime __P((void));
|
void badtime __P((void));
|
||||||
void die_you_gravy_sucking_pig_dog __P((void));
|
void die_you_gravy_sucking_pig_dog __P((void));
|
||||||
void doitfast __P((void));
|
|
||||||
void finish __P((int));
|
void finish __P((int));
|
||||||
void getoffset __P((char *));
|
void getoffset __P((char *));
|
||||||
void loop __P((void));
|
void loop __P((void));
|
||||||
@ -115,14 +112,11 @@ main(argc, argv)
|
|||||||
#endif
|
#endif
|
||||||
nosync = NULL;
|
nosync = NULL;
|
||||||
readstdin = 0;
|
readstdin = 0;
|
||||||
while ((ch = getopt(argc, argv, "-fhknr")) != EOF)
|
while ((ch = getopt(argc, argv, "-hknr")) != EOF)
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case '-':
|
case '-':
|
||||||
readstdin = 1;
|
readstdin = 1;
|
||||||
break;
|
break;
|
||||||
case 'f':
|
|
||||||
dofast = 1;
|
|
||||||
break;
|
|
||||||
case 'h':
|
case 'h':
|
||||||
dohalt = 1;
|
dohalt = 1;
|
||||||
break;
|
break;
|
||||||
@ -145,7 +139,7 @@ main(argc, argv)
|
|||||||
if (argc < 1)
|
if (argc < 1)
|
||||||
usage();
|
usage();
|
||||||
|
|
||||||
if (dofast && nosync) {
|
if (nosync) {
|
||||||
(void)fprintf(stderr,
|
(void)fprintf(stderr,
|
||||||
"shutdown: incompatible switches -f and -n.\n");
|
"shutdown: incompatible switches -f and -n.\n");
|
||||||
usage();
|
usage();
|
||||||
@ -332,8 +326,6 @@ die_you_gravy_sucking_pig_dog()
|
|||||||
(void)printf("\rbut you'll have to do it yourself\r\n");
|
(void)printf("\rbut you'll have to do it yourself\r\n");
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
if (dofast)
|
|
||||||
doitfast();
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (doreboot)
|
if (doreboot)
|
||||||
(void)printf("reboot");
|
(void)printf("reboot");
|
||||||
@ -341,8 +333,6 @@ die_you_gravy_sucking_pig_dog()
|
|||||||
(void)printf("halt");
|
(void)printf("halt");
|
||||||
if (nosync)
|
if (nosync)
|
||||||
(void)printf(" no sync");
|
(void)printf(" no sync");
|
||||||
if (dofast)
|
|
||||||
(void)printf(" no fsck");
|
|
||||||
(void)printf("\nkill -HUP 1\n");
|
(void)printf("\nkill -HUP 1\n");
|
||||||
#else
|
#else
|
||||||
if (doreboot) {
|
if (doreboot) {
|
||||||
@ -433,19 +423,6 @@ getoffset(timearg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define FSMSG "fastboot file for fsck\n"
|
|
||||||
void
|
|
||||||
doitfast()
|
|
||||||
{
|
|
||||||
int fastfd;
|
|
||||||
|
|
||||||
if ((fastfd = open(_PATH_FASTBOOT, O_WRONLY|O_CREAT|O_TRUNC,
|
|
||||||
0664)) >= 0) {
|
|
||||||
(void)write(fastfd, FSMSG, sizeof(FSMSG) - 1);
|
|
||||||
(void)close(fastfd);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#define NOMSG "\n\nNO LOGINS: System going down at "
|
#define NOMSG "\n\nNO LOGINS: System going down at "
|
||||||
void
|
void
|
||||||
nolog()
|
nolog()
|
||||||
@ -487,6 +464,6 @@ badtime()
|
|||||||
void
|
void
|
||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
fprintf(stderr, "usage: shutdown [-fhknr] shutdowntime [ message ]\n");
|
fprintf(stderr, "usage: shutdown [-hknr] shutdowntime [ message ]\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user