Commit Graph

17 Commits

Author SHA1 Message Date
Thomas Quinot
cfde77fbdf Set only the RB_POWEROFF flag (not the RB_HALT flag) when
'-p' is used on the reboot(8) command line.

This is intended for use when you want to attempt a power down
action, but you want the system to reboot (not halt) if the
power down action fails.

This is typically useful when the power-off action performed by
the kernel consists in signalling an uninterrupted power supply
that it should shut down its inverter if mains power has not returned.

The behaviour of shutdown(8) and init(8) is not modified;
only the behaviour of invoking 'reboot -p' manually is
modified, and then only in the case when a power-down action
fails.

Sounded reasonable to:	phk
Approved by:		roberto (mentor)
2002-10-06 16:24:36 +00:00
Gordon Tetlow
a72b2ac607 Correct the file that reboot -k creates so that it works with the new
nextboot functionality.

Reviewed by:	jake (mentor)
2002-05-28 21:15:49 +00:00
Wes Peters
8373917257 Rename the file used to specify the nextboot to make it clear that this
is a loader configuration file and can be used for more than just a
kernel name.

Submitted by:	Gordon Tetlow <gordont@gnf.org>
2002-04-26 22:32:15 +00:00
Wes Peters
1de372dcd4 Add a -k option to reboot to specify the kernel to boot next time
around.  If the kernel boots successfully, the record of this kernel
is erased, it is intended to be a one-shot option for testing
kernels.

This could be improved by having the loader remove the record of
the next kernel to boot, it is currently removed in /etc/rc immediately
after disks are mounted r/w.

I'd like to MFC this before the 4.6 freeze unless there is violent
objection.

Reviewed by:	Several on IRC
MFC after:	4 days
2002-04-26 07:31:04 +00:00
Dima Dorfman
8b032500b6 Constify and set WARNS=2.
Submitted by:	Mike Barcroft <mike@q9media.com>
2001-07-15 05:44:23 +00:00
Dima Dorfman
cafefe8c1b Include missing header files which define functions for which gcc has
builtins (e.g., exit, strcmp).
2001-06-24 23:04:23 +00:00
Nik Clayton
6714dac4b4 Remove the "undocumented" comment in re lflag. 2001-05-24 09:28:59 +00:00
Ian Dowse
85ae580ccb Reboot(8) normally waits 5 seconds after sending SIGTERMs to all
processes and then sends SIGKILLs. If a lot of processes are swapped
out, this delay may not be long enough, so processes such as an X
server may be killed before they have had time to clean up properly.

Make this delay more dynamic by waiting up to 60 seconds for swap
page-in activity to end. While I'm here, ANSIfy and remove a
`register' specifier.
2001-03-20 17:22:48 +00:00
John Polstra
85c981cc3f Add a "-d" option which causes the system to generate a crash dump. 1999-11-21 21:52:40 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Philippe Charnier
9448def93e Correct use of .Nm. Add rcsid. -Wall. Add -p flag in usage string (was missing). 1998-07-15 06:51:38 +00:00
Philippe Charnier
41e964cb5d Remove lines inside #ifdef 0/#endif. 1997-06-30 11:10:18 +00:00
Philippe Charnier
098166ed2d Use err(3) instead of local copy. 1997-06-16 06:43:13 +00:00
Warner Losh
8d64695c7c compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-29 03:33:12 +00:00
Julian Elischer
47be746682 Add support to halt, to allow it to request that the power be turned off
(the RB_POWEROFF flag)
1996-08-24 01:40:02 +00:00
David Greenman
7f4b19d683 Install aliases "fasthalt" and "fastboot" for halt and boot respectively.
This is for "backwards compatibility". Documented these aliases in the
manual page.
1994-08-21 05:48:34 +00:00
Rodney W. Grimes
8fae3551ec BSD 4.4 Lite sbin Sources
Note:  XNSrouted and routed NOT imported here, they shall be imported with
usr.sbin.
1994-05-26 06:35:07 +00:00