Date: Wed, 26 Dec 2001 13:04:06 +0100 From: Thomas Quinot <thomas@cuivre.fr.eu.org> To: freebsd-current@freebsd.org Subject: reboot -p Message-ID: <20011226130406.A79031@melusine.cuivre.fr.eu.org>
next in thread | raw e-mail | index | archive | help
Currently, when reboot is invoked with the '-p' command line flag (powerdown), it performs a shutdown with RB_HALT|RB_POWEROFF. In some situations, it can be useful to try to perform a poweroff, but reboot if it fails (e.g. when you are shutting down the system as a result of a power failure, you want the system to reboot, *not* stay down, if power was restored after the start of the shutdown procedure). It would be nice if reboot was changed to pass only RB_POWEROFF (without RB_HALT) when invoked with '-p'. Of course halt(8) whould be unaffected and still pass RB_HALT|RB_POWEROFF when invoked as halt -p. What do others think of this change: --- reboot.c Thu Aug 2 12:01:20 2001 +++ /tmp/reboot.c Wed Dec 26 13:03:45 2001 @@ -93,7 +93,7 @@ break; case 'p': pflag = 1; - howto |= (RB_POWEROFF | RB_HALT); + howto |= RB_POWEROFF; break; case 'q': qflag = 1; -- Thomas.Quinot@Cuivre.FR.EU.ORG To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011226130406.A79031>