e96b4170d0
This change allows to specify a watchdog(9) timeout for a system shutdown. The timeout is activated when the watchdogd daemon is stopped. The idea is to a prevent any indefinite hang during late stages of the shutdown. The feature is implemented in rc.d/watchdogd, it builds upon watchdogd -x option. Note that the shutdown timeout is not actiavted when the watchdogd service is individually stopped by an operator. It is also not activated for the 'shutdown' to the single-user mode. In those cases it is assumed that the operator knows what they are doing and they have means to recover the system should it hang. Significant subchanges and implementation details: - the argument to rc.shutdown, completely unused before, is assigned to rc_shutdown variable that can be inspected by rc scripts - init(8) passes "single" or "reboot" as the argument, this is not changed - the argument is not mandatory and if it is not set then rc_shutdown is set to "unspecified" - however, the default jail management scripts and jail configuration examples have been updated to pass "jail" to rc.shutdown, just in case - the new timeout can be set via watchdogd_shutdown_timeout rc option - for consistency, the regular timeout can now be set via watchdogd_timeout rc option - watchdogd_shutdown_timeout and watchdogd_timeout override timeout specifications in watchdogd_flags - existing configurations, where the new rc options are not set, should keep working as before I am not particularly wed to any of the implementation specifics. I am open to changing or removing any of them as long as the provided functionality is the same (or very close) to the proposed one. For example, I think it can be implemented without using watchdogd -x, by means of watchdog(1) alone. In that case there would be a small window between stopping watchdogd and running watchdog, but I think that that is acceptable. Reviewed by: bcr (man page changes) MFC after: 5 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D21221 |
||
---|---|---|
.. | ||
a.out.5 | ||
acct.5 | ||
ar.5 | ||
autofs.5 | ||
bluetooth.device.conf.5 | ||
bluetooth.hosts.5 | ||
bluetooth.protocols.5 | ||
boot.config.5 | ||
cd9660.5 | ||
core.5 | ||
devfs.5 | ||
devfs.conf.5 | ||
devfs.rules.5 | ||
device.hints.5 | ||
dir.5 | ||
disktab.5 | ||
elf.5 | ||
ethers.5 | ||
eui64.5 | ||
ext2fs.5 | ||
fbtab.5 | ||
fdescfs.5 | ||
forward.5 | ||
freebsd-update.conf.5 | ||
fs.5 | ||
fstab.5 | ||
fusefs.5 | ||
group.5 | ||
hesiod.conf.5 | ||
hosts.5 | ||
hosts.equiv.5 | ||
hosts.lpd.5 | ||
intro.5 | ||
libmap.conf.5 | ||
link.5 | ||
linprocfs.5 | ||
linsysfs.5 | ||
mailer.conf.5 | ||
make.conf.5 | ||
Makefile | ||
Makefile.depend | ||
moduli.5 | ||
motd.5 | ||
mount.conf.5 | ||
mqueuefs.5 | ||
msdosfs.5 | ||
networks.5 | ||
nsmb.conf.5 | ||
nsswitch.conf.5 | ||
nullfs.5 | ||
passwd.5 | ||
pbm.5 | ||
periodic.conf.5 | ||
pf.conf.5 | ||
pf.os.5 | ||
phones.5 | ||
portindex.5 | ||
portsnap.conf.5 | ||
procfs.5 | ||
protocols.5 | ||
quota.user.5 | ||
rc.conf.5 | ||
rctl.conf.5 | ||
regdomain.5 | ||
remote.5 | ||
resolver.5 | ||
services.5 | ||
shells.5 | ||
src.conf.5 | ||
stab.5 | ||
style.Makefile.5 | ||
style.mdoc.5 | ||
sysctl.conf.5 | ||
tmpfs.5 |