Commit graph

215 commits

Author SHA1 Message Date
Ed Schouten bf8959b05d Port the remaining apps in sbin/ to utmpx; only reboot(8). 2010-01-13 17:59:23 +00:00
Ed Schouten 88a8f792b6 Add forgotten `void' keyword. This function has no arguments. 2009-12-29 09:13:20 +00:00
Ed Schouten 14c69f2136 Let init(8) and reboot(8) use utmpx to log wtmp entries.
logwtmp() gets called with the raw strings that are written to disk. For
regular user entries, this isn't too bad, but when booting/shutting
down, the contents get rather cryptic.

Just call the standardized pututxline().
2009-12-05 20:26:55 +00:00
Dag-Erling Smørgrav c574558f28 More rational usage() 2009-11-10 09:44:55 +00:00
Ruslan Ermilov 106d839190 Switch the default WARNS level for sbin/ to 6.
Submitted by:	Ulrich Spörlein
2009-10-19 16:00:24 +00:00
Bjoern A. Zeeb c09a6b1ab6 Remove and unused variable.
Submitted by:	Christoph Mallon christoph.mallon@gmx.de
MFC after:	2 weeks
2009-01-31 13:48:15 +00:00
Daniel Gerzo 75803d7f94 - Sweep the boot(8) man page after addition of boot.config(5).
Reviewed by: keramida
Approved by: re (kensmith)
2007-08-18 07:58:36 +00:00
Joseph Koshy f7eaf827ab Cross-reference nextboot(8).
MFC after:	3 days
2006-11-22 13:12:34 +00:00
Bruce M Simpson d8f7093860 Block a variety of signals which may afffect reboot(8), before killing
init(8), to avoid losing a race to them and dying before being able
to call reboot(2).

PR:		bin/64664
Submitted by:	maxim
Obtained from:	NetBSD
MFC after:	30 days
2006-08-02 13:05:38 +00:00
Bruce M Simpson b08d1553f4 Block SIGHUP before killing init(8), to avoid a race condition which may
kill the current process and hang the system when attempting reboot.

PR:		bin/64664
Reviewed by:	ssouhal, phk (historic)
MFC after:	30 days
2006-08-02 12:42:20 +00:00
Maxim Konovalov 4d05699b2f o Describe what actually boot(8) -m mutes.
PR:		docs/67893
Submitted by:	Chris Pepper, Daniel Gerzo
MFC after:	2 weeks
2006-04-18 19:00:02 +00:00
Wes Peters 52488123f3 Revert previous change, "getopts" (with an 's') is a builtin in
/bin/sh.
2006-01-18 04:48:45 +00:00
Wes Peters 8812100321 Remove dependency on getopts because it is on /usr and we want to
use 'nextboot -D' in rc.  Option parsing cribbed from vgrind.sh.
2006-01-16 16:18:54 +00:00
Ruslan Ermilov 4e9e907d63 -mdoc sweep. 2005-11-18 10:36:29 +00:00
Ruslan Ermilov 389ec19476 Do not install boot_i386.8 on all architectures. 2005-11-17 09:39:36 +00:00
Maxim Sobolev 50d89fc56a Add new option `q', which makes second stage loader quiet unless autoboot
is disabled or fails.

MFC after:	1 week
2005-10-16 01:55:35 +00:00
Yaroslav Tykhiy 08b9134350 Replace "/etc/make.conf" with references to make.conf(5)
where applicable.  The main reason for this change is that
the location of make.conf is not constant and can be
modified via __MAKE_CONF.  This change also improves
hyper-text linkage in our manpages.

MFC after:	2 weeks
2005-10-10 14:55:59 +00:00
Ruslan Ermilov 8c81e13758 Simplified markup. 2005-09-28 06:57:56 +00:00
Ian Dowse a00a259113 Add the ability to specify the boot2 serial console speed in
/boot.config or on the "boot:" prompt line via a "-S<speed>" flag,
e.g. "-h -S19200". This adds about 50 bytes to the size of boot2
and required a few other small changes to limit the size impact.
This changes only affects boot2; there are further loader changes
to follow.
2005-08-18 00:42:45 +00:00
Giorgos Keramidas 497dd0f938 Spell "partition" correctly.
PR:		docs/84198
Submitted by:	Gary W. Swearingen
MFC after:	3 days
2005-07-28 10:48:07 +00:00
Pawel Jakub Dawidek 3edf7a78b7 Truncate nextboot.conf file on creation, so existing garbage will be removed.
Submitted by:	Gary Allan <dragonfly@gallan.plus.com>
Obtained from:	DragonFlyBSD
MFC after:	3 days
2005-03-21 23:44:04 +00:00
Ruslan Ermilov 8d646af581 Sync program's usage() with manpage's SYNOPSIS. 2005-02-10 09:19:34 +00:00
Xin LI 36737a0b77 Code style tweaks: Use static and const where suitable. 2005-01-25 08:24:06 +00:00
Xin LI faa0ecdd5d The kernel specified in main() of reboot(8) will be initialized
with -k option and never be used without kflag.  This confuses
gcc because we set "kflag" at the same time with "kernel", but
the logic is not that apparant for gcc.

Since we can initialize "kernel" to NULL then know if "k" option
is set through determining whether it is still NULL, don't try
to have gcc to guess why we are connecting "kflag" with "kernel"
and use "kernel" directly in place of kflag.

Bump WARNS?= from 2 to 6
2005-01-25 08:14:00 +00:00
Ruslan Ermilov 6087df9e8b Sort sections. 2005-01-18 10:09:38 +00:00
Ruslan Ermilov 214144704b Scheduled mdoc(7) sweep. 2005-01-10 16:17:34 +00:00
Ruslan Ermilov 52501c5ede Fixed desctiptions of some options:
- Document better what the -C option means.
- The -c option is currently a no-op.
- The -D and -h options do not allow switching between
  single/dual console modes and internal/video consoles.
  (This used to be true for the old biosdisk boot code,
  but now they just force the multiple consoles mode and
  serial console, respectively.)
2004-09-30 09:59:44 +00:00
Ruslan Ermilov 295a9701bb FreeBSD has full support for multiple consoles since 2001. 2004-09-30 09:15:33 +00:00
Brooks Davis 0513a60b6b Sort the SEE ALSO list correctly. Update the document date.
Reported by:	ru
2004-09-23 15:26:01 +00:00
Brooks Davis 9f4709d67c Refrence bsdlabel.8 and bsdlabel.5 rather then the obsolete disklabel.8
and disklabel.5.  Refrencing bsdlabel.5 is somewhat bogus as it is not
connected to the build and is mostly unwritten at this point.

Reported by:	Matthias Andree <matthias.andree at web.de>
PR:		docs/72020
2004-09-23 04:57:58 +00:00
Mike Silbersack 9e09a91233 Clarify boot.8 (i386 version) a bit, so that people know
where boot.config needs to reside.  Also change /kernel
to /boot/loader, as that is the apparent default now.  This
man page probably requires more updates.
2004-07-18 21:39:45 +00:00
Ruslan Ermilov 9806e23132 Mechanically kill hard sentence breaks. 2004-07-02 21:45:06 +00:00
Mark Murray 4c723140a4 Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999.

Approved by: core, imp
2004-04-09 19:58:40 +00:00
David E. O'Brien 9055e6fd1b Share the i386 boot manual page. 2004-03-22 00:52:27 +00:00
David E. O'Brien c69284ca08 Use __FBSDID() to quiet GCC 3.3 warnings. 2003-05-03 18:41:59 +00:00
Robert Watson 6ab0d6c220 When kill(-1) returns ESRCH, it could be because the current process
doesn't have a process group, which can occur if you're working with
a custom init that doesn't set up a full tty context.  Rather than
refusing to reboot, ignore ESRCH from the kill attempt in reboot(8).
2003-04-02 22:13:56 +00:00
Tom Rhodes 1512a2352d Add the /boot prefix. I forgot this when updating the location.
Neglected by:	trhodes
2003-01-13 18:57:19 +00:00
Tom Rhodes 3df9fdfb2f Update the kernel location in FILES.
PR:	47015
2003-01-13 16:15:56 +00:00
Jens Schweikhardt 57bd0fc6e8 english(4) police. 2002-12-27 12:15:40 +00:00
Ruslan Ermilov 8d5d039f80 Uniformly refer to a file system as "file system".
Approved by:	re
2002-12-12 17:26:04 +00:00
Ruslan Ermilov afb09e9fb8 mdoc(7) police: overhaul. 2002-12-12 13:40:31 +00:00
Ruslan Ermilov 8573f80562 mdoc(7) police: Nits.
Approved by:	re
2002-11-26 09:05:06 +00:00
Bruce A. Mah bec89d6c57 Fix one misspelling and two punctuation nits. 2002-11-07 16:00:48 +00:00
Gordon Tetlow e2b57789f8 Hook the new nextboot(8) manpage up to the build. 2002-11-04 17:39:54 +00:00
Gordon Tetlow b277773de2 Add a nextboot manual page.
Spotted by:	brandt@fokus.gmd.de
2002-11-04 17:35:22 +00:00
Thomas Quinot 2aeb6b2708 Document behaviour change in reboot(8) introduced in reboot.c rev. 1.17:
when using '-p' with reboot, and the power down action failds, reboot
the system normally. The behaviour of 'halt -p' and of shutdown(8) is
unchanged.

Approved by:	roberto
2002-10-07 21:18:20 +00:00
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
Tom Rhodes ce66ddb763 s/filesystem/file system/g as discussed on -developers 2002-08-21 18:11:48 +00:00
Philippe Charnier 629e80effb The .Nm utility. 2002-07-06 19:35:14 +00:00
Ruslan Ermilov 10cb9bd3d8 mdoc(7) police: nits. 2002-05-29 16:47:55 +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
Gordon Tetlow a119f25995 Add a nextboot script to make it easier to control the loader nextboot
support. Also, hook it up to the build.

Approved by:	jake (mentor)
2002-05-24 04:06:03 +00:00
Tom Rhodes 3468b317cb more file system > filesystem 2002-05-16 04:10:46 +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
Pierre Beyssac bc6d68df97 Add forgotten flag in flag lists.
PR:		docs/36267	(partial)
Submitted by:	Thomas Quinot <thomas.cuivre.fr.eu.org>
2002-03-25 10:45:28 +00:00
Pierre Beyssac 038148d678 Add option -n to i386 boot2 to disallow boot interruption by keypress.
PR:		i386/36016
Submitted by:	Thomas Quinot <thomas@cuivre.fr.eu.org>
Reviewed by:	rnordier
MFC after:	1 week
2002-03-23 19:40:27 +00:00
Robert Nordier 8a1917d017 Clarify the cylinder > 1023 issue, now that EDD support is automatic.
Also drop a note about undocumented features that was intended to
cover the since-documented slice-selection syntax.
2002-03-13 19:00:19 +00:00
Ruslan Ermilov cd6ab711b3 Document the "slice" syntax.
Prodded by:	ambrisko
2002-03-13 12:30:46 +00:00
Ruslan Ermilov 9662d32c73 Implement -m and -p loader(8) "boot" command options in boot2.
(This is more useful for 4.x where boot blocks can still load
kernels, modulo the PR kern/17422.)
2002-03-13 11:03:36 +00:00
Ruslan Ermilov e237860a3c mdoc(7) police: add -p to the synopsis line as well. 2001-12-14 15:03:32 +00:00
Guido van Rooij 28703190c5 Add new boot flag to i386 boot: -p.
This flag adds a pausing utility. When ran with -p, during the kernel
probing phase, the kernel will pause after each line of output.
This pausing can be ended with the '.' key, and is automatically
suspended when entering ddb.

This flag comes in handy at systems without a serial port that either hang
during booting or reser.
Reviewed by:	(partly by jlemon)
MFC after:	1 week
2001-12-10 20:02:22 +00:00
David E. O'Brien 2d68bf45bf Default to WARNS=2.
Binary builds that cannot handle this must explicitly set WARNS=0.

Reviewed by:	mike
2001-12-04 02:19:58 +00:00
Ruslan Ermilov 69f568ec4d Use ${MACHINE}, it works with cross-builds. 2001-09-12 12:21:08 +00:00
Ruslan Ermilov 753d686d34 mdoc(7) police: s/BSD/.Bx/ where appropriate. 2001-08-14 10:01:54 +00:00
Ruslan Ermilov c4d9468ea0 mdoc(7) police:
Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text.
Not only this slows down the mdoc(7) processing significantly, but it also
has an undesired (in this case) effect of disabling hyphenation within the
entire enclosed block.
2001-08-07 15:48:51 +00:00
Dima Dorfman 7ebcc426ef Remove whitespace at EOL. 2001-07-15 07:53:42 +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
Dima Dorfman a910f192bb Remove duplicate words. 2001-06-24 01:34:38 +00:00
Nik Clayton 6714dac4b4 Remove the "undocumented" comment in re lflag. 2001-05-24 09:28:59 +00:00
Nik Clayton 0ee76202d0 Document the -l option.
PR:		docs/27440
Submitted by:	Flix-Antoine Paradis <reel@sympatico.ca>
2001-05-24 09:28:05 +00:00
Ruslan Ermilov eb0838029f mdoc(7) police: normalize .Nd. 2001-04-18 15:54:10 +00:00
Ruslan Ermilov 0a5779d45b - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:33:27 +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
Ruslan Ermilov d0353b836e mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:38:02 +00:00
Ruslan Ermilov 1252c1bb05 Prepare for mdoc(7)NG. 2000-12-18 15:16:24 +00:00
Ruslan Ermilov 7c7fb079b9 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 16:52:27 +00:00
Tim Vanderhoek 042f27bd00 .Xr boot0cfg 8 ,
PR:		misc/18267 (Usov Alexander <[3]usov@ups.kiev.ua>)
2000-05-13 14:41:04 +00:00
Joseph Koshy dba060d3e9 The new boot code uses ad' for ATA disks, not wd'. Correct the
manual page.
2000-03-03 09:51:45 +00:00
Sheldon Hearn ef8f7ac935 Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-01 11:27:47 +00:00
Alexey Zelkin 08ad04ce42 Add .Nm fastboot' and .Nm fasthalt' to NAME section. 2000-01-10 12:24:47 +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
Alexey Zelkin e57c888f2b Sync with reallity (USERCONFIG_BOOT option was removed long time ago)
mdoc(7)'fy
1999-10-15 12:50:18 +00:00
Peter Wemm 7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Kazutaka YOKOTA 688db407dc Remove reference to the obsoleted COMCONSOLE option.
Pointed out by: Crist J. Clark <cjc@cc942873-a.ewndsr1.nj.home.com>
1999-07-06 11:45:27 +00:00
Robert Nordier c64dca10ab Document -P (keyboard probe) assumptions. 1999-06-26 21:57:08 +00:00
Ruslan Ermilov d44b4fd298 Clarify some details. 1999-06-23 07:00:30 +00:00
Robert Nordier e5da9b6ba6 Include a table of disk error codes and a note about the cylinder >
1023 issue.
1999-05-22 12:55:16 +00:00
Robert Nordier 9ef416cfed Add cross-reference to loader man page, plus various minor
improvements.
1999-03-16 13:16:11 +00:00
Robert Nordier 8dfcea8cc1 Make some further revisions to the boot documentation. 1999-01-19 09:04:18 +00:00
Robert Nordier 89aeb8ced9 Make a start on revising the boot documentation. 1999-01-06 14:19:09 +00:00
Kazutaka YOKOTA 7af89e87f8 Remove the reference to the -b option; it's gone. 1998-09-23 06:54:14 +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
Poul-Henning Kamp 06c534212f The '-h' option cannot toggle the kernel from a serial console
if the kernel was built with COMCONSOLE

PR:		7202
Reviewed by:	phk
Submitted by:	Greg A. Woods <woods@zeus.leitch.com>
1998-07-09 06:24:21 +00:00
Poul-Henning Kamp 862a7e9c36 say a few words about the -b option.
Reviewed by:	Bill Trost <trost@cloud.rain.com>
1998-04-26 18:15:38 +00:00
Daniel O'Callaghan 048362aaa8 PR: 6104
Submitted by:	Anatoly Vorobey <mellon@pobox.com>
Fix typo
1998-03-23 06:36:57 +00:00
Mike Smith 0c473d5219 Document the enhanced behaviour of the '-c' flag. 1998-02-10 00:17:44 +00:00
Bruce Evans c65c062f59 Document recent changes (config files and -D...) and not so recent changes
(bios drive number...).

Submitted by:	mostly by yokota
1997-07-05 02:02:02 +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
Peter Wemm c0ec1f37ef Revert $FreeBSD$ to $Id$ 1997-02-22 14:40:44 +00:00
Jordan K. Hubbard 1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Wolfram Schneider af20215665 Sort cross references. 1997-01-13 00:25:51 +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
Mike Pritchard f80cd54d34 Removed the boot_*(8) man pages for machines we don't support:
hp300, sparc, tahoe, and vax
1996-02-12 04:29:10 +00:00
Mike Pritchard 78b0b234eb Correct a bunch of man page cross references and generally
try and silence "manck".

ncurses, rpc, and some of the gnu stuff are still a big mess, however.
1996-02-11 22:38:05 +00:00
Mike Pritchard e71057d8d0 Fix a bunch of spelling errors. 1996-01-29 23:52:43 +00:00
Joerg Wunsch d16b647e7f Totally revamp the man page, update to the state of affairs.
Make a link from boot_${ARCH}.8 to boot.8, so people will get what
they expect when asking "man boot".

I think David will lynch me when i'm requesting this to go into 2.1... :-)
1995-10-07 12:05:00 +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
David Greenman b3bfc7199e Converted 'vmunix' to 'kernel'. 1994-08-05 09:14:37 +00:00
Garrett Wollman 404c1a5fc1 Convert to our man installation style. Also fixed long-standing bug
in `fastboot'/`fasthalt' in which the interpreter would hang around
after `reboot' or `halt' is run, causing an irritating ``Killed'' message.
1994-08-05 02:42:42 +00:00
Rodney W. Grimes 3491fdaeb0 Disable afterinstall: for manual pages until the manual page fix patch
comes in.
1994-05-28 06:27:25 +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