1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-20 02:38:43 +00:00
freebsd/usr.sbin
Andriy Gapon 5fda0d60c1 add ability to set watchdog timeout for a shutdown
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
2019-10-03 11:23:10 +00:00
..
ac various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
accton
acpi Merge ACPICA 20190329. 2019-03-29 20:21:28 +00:00
adduser various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
amd Convert amd newvers to using newvers.sh -v. 2019-05-23 17:18:56 +00:00
ancontrol
apm
apmd Stop linking to libl by specifying we do not need yywrap 2019-09-10 07:23:01 +00:00
arp Remove infrastructure for token-ring networks. 2018-03-28 23:33:26 +00:00
audit
auditd Move OpenBSM to CONFS 2018-08-11 13:23:09 +00:00
auditdistd
auditreduce
authpf
autofs autofs: Fix autounmountd's printing of mount time. 2019-08-09 02:20:26 +00:00
bhyve bhyve: support for enabling/disabling the net backend 2019-09-28 12:02:43 +00:00
bhyvectl style(9) remove unnecessary blank tabs. 2018-06-13 03:35:24 +00:00
bhyveload usr.sbin/bhyveload: don't leak an fd if a device can't be opened 2019-07-12 18:38:18 +00:00
binmiscctl Improve the binmiscctl manual page 2018-07-20 22:50:21 +00:00
blacklistctl
blacklistd Move blacklistd.conf to usr.sbin/blacklistd/ 2018-07-31 16:39:38 +00:00
bluetooth iwmbtfw(8): Fix compilation on platforms using gcc. 2019-08-18 23:10:07 +00:00
boot0cfg Remove deprecated GEOM classes 2019-08-13 20:06:55 +00:00
bootparamd
bsdconfig Remove iBCS2, part1: userspace 2018-12-19 21:56:54 +00:00
bsdinstall Add a comment explaining why the opensolaris_load line in loader.conf 2019-10-02 16:09:28 +00:00
bsnmpd No need for each bsnmpd(1) module to open connection to syslog 2019-06-21 07:45:58 +00:00
btxld Explicitly ignore return value from remove. We wouldn't do anything 2017-12-28 05:33:19 +00:00
camdd Fix uninitialized variable in camdd 2019-06-09 02:06:31 +00:00
cdcontrol
certctl [2/3] Add certctl(8) 2019-10-02 01:05:53 +00:00
chkgrp various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
chown Handle overflow of uid or gid in arguments for chown 2018-09-26 18:40:57 +00:00
chroot chroot.8: Add examples & clean up 2019-03-14 14:34:36 +00:00
ckdist various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
clear_locks various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
config config: do not link against libl, it is not needed 2019-09-10 07:14:39 +00:00
cpucontrol cpucontrol: check for the supposed firmware file type and skip 2019-01-11 08:35:49 +00:00
crashinfo Support compressed crash dumps in crashinfo(8). 2018-07-23 18:08:56 +00:00
cron cron: add log suppression and mail suppression for successful runs 2019-09-25 02:37:40 +00:00
crunch crunch: remove rsh and rlogin from example config file 2019-08-13 15:23:14 +00:00
ctladm Add device temperature reporting into CTL. 2019-07-26 03:49:16 +00:00
ctld Stop linking to libl by specifying we do not need yywrap 2019-09-10 07:28:27 +00:00
cxgbetool cxgbetool(8): Add a subaction (tcbrss <n>) that can be used with "pass" 2018-10-27 05:26:09 +00:00
daemon Bump .Dd for earlier update (should have been part of r353024). 2019-10-02 23:19:34 +00:00
dconschat
devctl Fix gcc warning about shadowed global. 2019-04-05 20:12:19 +00:00
devinfo devinfo_init() returns an errno, but doesn't set errno, so the error 2018-05-30 15:08:59 +00:00
diskinfo Sanity check media size and sector counts to ensure that we don't 2018-01-06 12:34:03 +00:00
dumpcis Remove All Rights Reserved 2019-02-05 21:37:34 +00:00
editmap
edquota
eeprom various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
efibootmgr efibootmgr(8): fix markup and style issues 2019-09-25 21:23:30 +00:00
efidp Regularize the Netflix copyright 2019-02-04 21:28:25 +00:00
efivar Document the efivar --load-option option 2019-03-07 00:01:28 +00:00
etcupdate Unbreak etcupdate(8) and mergemaster(8) after r352950 2019-10-02 12:46:28 +00:00
extattr various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
extattrctl various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
fdcontrol Tag 'a' case as one we're intentionally falling through to 2018-01-05 07:28:48 +00:00
fdformat fdformat is a sysadmin command and thus its man page should be in 2017-12-05 05:02:46 +00:00
fdread various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
fdwrite SPDX: use the Beerware identifier. 2017-11-30 20:33:45 +00:00
fifolog various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
flowctl various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
fmtree mtree: Fix -f -f not considering type changes. 2019-09-12 18:44:48 +00:00
freebsd-update freebsd-update: Add updatesready' and showconfig' commands 2019-09-24 20:49:33 +00:00
fstyp Drop "All rights reserved" from the files I own 2019-03-11 22:23:56 +00:00
ftp-proxy
fwcontrol Don't close fd twice. This line should have been deleted in r327279. 2018-01-05 05:34:20 +00:00
getfmac various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
getpmac various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
gpioctl gpioctl.8: Fix man page section 2018-06-06 18:52:33 +00:00
gssd * Handle SIGPIPE in gssd 2019-02-21 01:30:37 +00:00
gstat - Add CSV output to gstat via -C flag. 2018-08-21 11:22:49 +00:00
hyperv
i2c Add a new 'tr' (transfer) mode to i2c(8) to support more i2c controllers. 2019-05-22 21:06:10 +00:00
ifmcstat bits is never null when we call ot. Add an assert to that effect and 2018-01-05 07:28:58 +00:00
inetd Remove all the RELEASE_CRUNCH instances that partially disable IPSEC 2019-07-15 14:19:39 +00:00
iostat In iostat(8) output, skip the decimal point and the fractional part 2019-06-16 17:32:05 +00:00
iovctl
ip6addrctl pkgbase: Put a lot of binaries and lib in FreeBSD-runtime 2019-09-05 14:13:08 +00:00
ipfwpcap Buildfix for GCC after r334277. 2018-05-28 09:41:44 +00:00
iscsid iscsi: simplify the capsicumization 2018-11-30 19:40:16 +00:00
jail add ability to set watchdog timeout for a shutdown 2019-10-03 11:23:10 +00:00
jexec various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
jls various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
kbdcontrol Stop linking to libl by specifying we do not need yywrap 2019-09-10 07:26:38 +00:00
kbdmap Silence a CI warning regarding the use of strcpy(). 2019-01-22 13:11:15 +00:00
keyserv
kgmon Free zbuf when kflag is true too. 2017-12-28 05:34:04 +00:00
kldxref pkgbase: Put a lot of binaries and lib in FreeBSD-runtime 2019-09-05 14:13:08 +00:00
lastlogin A single comma was missing to separate the "see also" items in 2018-10-20 17:22:04 +00:00
lpr Fix clang -Wcast-qual issues 2019-05-04 02:09:30 +00:00
lptcontrol various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
mailstats
mailwrapper Revert r326844 2018-01-02 16:50:57 +00:00
makefs buf: Add B_INVALONERR flag to discard data 2019-09-11 21:24:14 +00:00
makemap
manctl
memcontrol various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
mergemaster Unbreak etcupdate(8) and mergemaster(8) after r352950 2019-10-02 12:46:28 +00:00
mfiutil Make mfiutil show progress print out the elapsed time estimate in a 2018-10-13 02:21:23 +00:00
mixer mixer(8): Report an error if the passed value is an empty string 2019-08-25 17:55:31 +00:00
mld6query Remove the USE_RFC2292BIS option and reap dead code 2019-07-22 20:11:33 +00:00
mlx5tool Use size_t for byte_to_write variable when comparing to eeprom_info_out_len 2019-10-02 10:58:27 +00:00
mlxcontrol various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
mount_smbfs
mountd Add a reference to the NFSv3 RFC. 2019-08-08 21:08:13 +00:00
moused Remove mse(4) from tree 2018-10-22 02:34:10 +00:00
mpsutil mpsutil slot set status 2019-09-04 13:47:38 +00:00
mptable various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
mptutil mptutil: emit a warning on big-endian architectures 2019-07-22 17:25:35 +00:00
mtest mtest: build with WARNS=3 2018-05-19 20:57:22 +00:00
ndiscvt Stop linking to libl by specifying we do not need yywrap 2019-09-10 07:28:27 +00:00
ndp Update the "flag" for draft-ietf-6man-ipv6only-flag. 2018-11-03 18:03:24 +00:00
newsyslog Use correct filename in newsyslog.conf 2019-09-17 20:05:06 +00:00
nfscbd
nfsd nfsd.8: Fix mandoc -Tlint and igor warnings 2019-05-09 19:03:52 +00:00
nfsdumpstate Add #ifdef INET6 around declaration of nbuf. 2019-04-28 22:37:59 +00:00
nfsrevoke
nfsuserd Delete the BUGS entry related to failing when jails are enabled. 2019-04-06 22:14:03 +00:00
ngctl Replace complicated expression to disable libedit when no libthr is being built 2019-07-15 14:23:51 +00:00
nghook
nmtree
nologin
nscd Workaround for nscd(8) failure with large entries. 2019-01-17 20:01:06 +00:00
ntp Reduce calls to close(2) at startup through the use of closefrom(2). 2019-09-19 14:45:04 +00:00
nvram
ofwdump
pciconf Report Clock Power Management support and status. 2019-08-23 15:17:04 +00:00
periodic periodic: replace "tty" with "test -t 0" 2019-08-19 01:14:11 +00:00
pkg Apply r346792 (cperciva) from stable/12 to head. The original commit 2019-09-19 16:43:12 +00:00
pmc pmc: Fix stack std::string lifetime 2019-05-22 01:22:33 +00:00
pmcannotate Teach pmcannotate about $TMPDIR and _PATH_TMP 2018-05-18 14:14:04 +00:00
pmccontrol restore pmccontrol -L behavior on x86 2018-09-24 19:06:09 +00:00
pmcstat Regularize the Netflix copyright 2019-02-04 21:28:25 +00:00
pmcstudy Replace -Werror with ${WERROR} in pmcstudy 2019-08-25 22:06:26 +00:00
pnfsdscopymr Fix the err() arguments for a nfssvc(8) failure. 2018-08-08 20:30:12 +00:00
pnfsdsfile Document the new "-m" command line option for pnfsdsfile(8). 2018-07-01 17:51:52 +00:00
pnfsdskill Document the "-f" option added to pnfsdskill(8) by r336176. 2018-07-10 18:44:44 +00:00
pnpinfo
portsnap Remove INDEX-10 reference, as 10.x is now EoL. 2019-04-16 14:07:14 +00:00
powerd powerd(8): allow to force a method of battery state query 2019-01-06 02:39:03 +00:00
ppp Retire the -DRELEASE_CRUNCH define. 2019-07-12 06:19:25 +00:00
pppctl pppctl88) Avoid strcpy() copies on overlapping string. 2018-01-29 14:23:44 +00:00
praliases
praudit praudit(1): add tests 2018-06-17 17:31:16 +00:00
prometheus_sysctl_exporter
pstat
pw Remove an uneeded indentation introduced in r286196 to silence gcc warnging 2019-05-25 21:57:01 +00:00
pwd_mkdb pkgbase: Put a lot of binaries and lib in FreeBSD-runtime 2019-09-05 14:13:08 +00:00
pwm Oops, it seems I left out the word 'cycle', fix it. 2019-06-18 02:27:30 +00:00
quot Normally when an attempt is made to mount a UFS/FFS filesystem whose 2018-12-06 00:09:39 +00:00
quotaon
rarpd SPDX: mostly fixes to previous changes. 2017-12-13 16:13:17 +00:00
repquota
rip6query
rmt Fix missing files in METALOG with -DNO_ROOT 2018-06-29 21:15:17 +00:00
route6d Use the right variable when updating interface routes. 2018-08-08 20:15:40 +00:00
rpc.lockd userland: Fix several typos and minor errors 2017-12-27 03:23:01 +00:00
rpc.statd - Revert WARNS to 2 because of mismatch between (xdrproc_t) and xdr_void(). 2019-09-21 13:34:06 +00:00
rpc.umntall various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
rpc.yppasswdd Increase YPMAXRECORD to 16M to be compatible with Linux. 2019-08-12 20:27:33 +00:00
rpc.ypupdated Increase YPMAXRECORD to 16M to be compatible with Linux. 2019-08-12 20:27:33 +00:00
rpc.ypxfrd
rpcbind Plug a possible memory leak. 2018-03-19 05:49:26 +00:00
rrenumd by specifyng we do not use yywrap we can avoid linking to libl and liby 2019-09-10 07:20:32 +00:00
rtadvctl Fix grammar. 2019-03-05 02:53:41 +00:00
rtadvd Remove obsolete compatibility code from rtadvd. 2019-07-17 16:50:53 +00:00
rtprio various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
rtsold rtsol: Use vwarnx(3) to log messages to standard error. 2019-02-27 18:13:41 +00:00
rwhod capsicum: use a new capsicum helpers in tools 2018-11-04 19:24:49 +00:00
sa various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
sendmail
service Use "$@" instead of $* to cope with parameters that have spaces in 2018-06-13 06:11:04 +00:00
services_mkdb pkgbase: Put a lot of binaries and lib in FreeBSD-runtime 2019-09-05 14:13:08 +00:00
sesutil Check element type before setting LEDs. 2019-02-04 01:24:10 +00:00
setfib
setfmac various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
setpmac various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
simple_httpd Move httpd to simple_httpd... 2019-10-01 18:14:37 +00:00
smbmsg various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
snapinfo various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
spi Add an example for displaying the manufacturer and size info from a 2018-06-23 23:08:25 +00:00
spkrtest various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
spray spray: fix the spelling in an output string 2018-03-05 16:13:29 +00:00
syslogd log daemon.info to /var/log/daemon.log by default 2019-09-17 20:03:20 +00:00
sysrc Update the spelling of my name 2019-04-22 17:52:46 +00:00
tcpdchk
tcpdmatch
tcpdrop Use uintptr_t alone when assigning to kvaddr_t variables. 2018-07-10 13:03:06 +00:00
tcpdump
tests
traceroute pkgbase: Put a lot of binaries and lib in FreeBSD-runtime 2019-09-05 14:13:08 +00:00
traceroute6 pkgbase: Put a lot of binaries and lib in FreeBSD-runtime 2019-09-05 14:13:08 +00:00
trim trim(8): emit more user-friendly error message in verbose mode. 2019-03-15 14:42:23 +00:00
trpt trpt(8): Clean up build hack to detect ancient compiler 2018-02-16 20:46:44 +00:00
tzsetup tzsetup: upgrade to zone1970.tab 2019-07-17 06:17:27 +00:00
uathload various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
uefisign Fix alignment issue in uefisign 2018-12-19 22:47:37 +00:00
ugidfw various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
uhsoctl Use correct type for IOCTL request argument. 2018-11-02 22:23:25 +00:00
unbound Check that /etc/resolv.conf exists before trying to read it. 2018-11-27 09:46:01 +00:00
usbconfig Implement detach_kernel_driver command in usbconfig(8). 2019-08-16 21:17:56 +00:00
usbdump Fix parsing of corrupt data in usbdump(8). Check that the transfer 2019-06-25 13:15:29 +00:00
utx various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
vidcontrol Fix restoring the geometry when recovering from an error. Just restore the 2019-04-08 04:07:37 +00:00
vigr
vipw
wake various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
watch Revert r327005 - SPDX tags for license similar to BSD-2-Clause. 2017-12-20 20:25:28 +00:00
watchdogd various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
wlandebug Revert r344211: wlandebug: disable PIE to fix build failure 2019-02-25 18:27:19 +00:00
wpa pkgbase: Add a FreeBSD-hostapd package 2019-07-19 15:09:00 +00:00
yp_mkdb
ypbind various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
ypldap Increase YPMAXRECORD to 16M to be compatible with Linux. 2019-08-12 20:27:33 +00:00
yppoll various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
yppush Increase YPMAXRECORD to 16M to be compatible with Linux. 2019-08-12 20:27:33 +00:00
ypserv Increase YPMAXRECORD to 16M to be compatible with Linux. 2019-08-12 20:27:33 +00:00
ypset various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
zic
zonectl
zzz
Makefile [2/3] Add certctl(8) 2019-10-02 01:05:53 +00:00
Makefile.amd64 Remove kgzip and kgzldr. 2019-05-24 05:34:21 +00:00
Makefile.arm
Makefile.arm64
Makefile.i386 Remove kgzip and kgzldr. 2019-05-24 05:34:21 +00:00
Makefile.inc
Makefile.mips
Makefile.powerpc
Makefile.riscv Build ofwdump on riscv. 2018-07-24 20:20:17 +00:00
Makefile.sparc64