mirror of
https://git.freebsd.org/src.git
synced 2026-01-11 19:57:22 +00:00
shutdown: Adapt to changes in reboot
Now that halt and reboot actually signal init, shutdown needs to run fasthalt or fastboot instead when given the -o option. MFC after: 1 month Reviewed by: imp, allanjude Differential Revision: https://reviews.freebsd.org/D54122
This commit is contained in:
parent
4453ec5b87
commit
2a3b164175
2 changed files with 8 additions and 8 deletions
|
|
@ -105,9 +105,9 @@ or
|
|||
options is specified,
|
||||
.Nm
|
||||
will execute
|
||||
.Xr halt 8
|
||||
.Xr fasthalt 8
|
||||
or
|
||||
.Xr reboot 8
|
||||
.Xr fastboot 8
|
||||
instead of sending a signal to
|
||||
.Xr init 8 .
|
||||
.It Fl n
|
||||
|
|
@ -116,9 +116,9 @@ If the
|
|||
option is specified, prevent the file system cache from being flushed by passing
|
||||
.Fl n
|
||||
to
|
||||
.Xr halt 8
|
||||
.Xr fasthalt 8
|
||||
or
|
||||
.Xr reboot 8 .
|
||||
.Xr fastboot 8 .
|
||||
This option should probably not be used.
|
||||
.It Fl q
|
||||
Shut down quietly.
|
||||
|
|
|
|||
|
|
@ -407,7 +407,7 @@ die_you_gravy_sucking_pig_dog(void)
|
|||
} else {
|
||||
if (doreboot) {
|
||||
BOOTTRACE("exec reboot(8) -l...");
|
||||
execle(_PATH_REBOOT, "reboot", "-l", nosync,
|
||||
execle(_PATH_REBOOT, "fastboot", "-l", nosync,
|
||||
(char *)NULL, empty_environ);
|
||||
syslog(LOG_ERR, "shutdown: can't exec %s: %m.",
|
||||
_PATH_REBOOT);
|
||||
|
|
@ -415,7 +415,7 @@ die_you_gravy_sucking_pig_dog(void)
|
|||
}
|
||||
else if (dohalt) {
|
||||
BOOTTRACE("exec halt(8) -l...");
|
||||
execle(_PATH_HALT, "halt", "-l", nosync,
|
||||
execle(_PATH_HALT, "fasthalt", "-l", nosync,
|
||||
(char *)NULL, empty_environ);
|
||||
syslog(LOG_ERR, "shutdown: can't exec %s: %m.",
|
||||
_PATH_HALT);
|
||||
|
|
@ -423,14 +423,14 @@ die_you_gravy_sucking_pig_dog(void)
|
|||
}
|
||||
else if (dopower) {
|
||||
BOOTTRACE("exec halt(8) -l -p...");
|
||||
execle(_PATH_HALT, "halt", "-l", "-p", nosync,
|
||||
execle(_PATH_HALT, "fasthalt", "-l", "-p", nosync,
|
||||
(char *)NULL, empty_environ);
|
||||
syslog(LOG_ERR, "shutdown: can't exec %s: %m.",
|
||||
_PATH_HALT);
|
||||
warn(_PATH_HALT);
|
||||
}
|
||||
else if (docycle) {
|
||||
execle(_PATH_HALT, "halt", "-l", "-c", nosync,
|
||||
execle(_PATH_HALT, "fasthalt", "-l", "-c", nosync,
|
||||
(char *)NULL, empty_environ);
|
||||
syslog(LOG_ERR, "shutdown: can't exec %s: %m.",
|
||||
_PATH_HALT);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue