The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=2a3b1641756a4f0c50338a17e310f8a2dbd31b50
commit 2a3b1641756a4f0c50338a17e310f8a2dbd31b50 Author: Dag-Erling Smørgrav <[email protected]> AuthorDate: 2025-12-10 14:46:08 +0000 Commit: Dag-Erling Smørgrav <[email protected]> CommitDate: 2025-12-10 14:46:08 +0000 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 --- sbin/shutdown/shutdown.8 | 8 ++++---- sbin/shutdown/shutdown.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sbin/shutdown/shutdown.8 b/sbin/shutdown/shutdown.8 index 2f09f5d524a9..81ce2a045859 100644 --- a/sbin/shutdown/shutdown.8 +++ b/sbin/shutdown/shutdown.8 @@ -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. diff --git a/sbin/shutdown/shutdown.c b/sbin/shutdown/shutdown.c index 762b23ab6bd9..0fb39530b463 100644 --- a/sbin/shutdown/shutdown.c +++ b/sbin/shutdown/shutdown.c @@ -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);
