Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
watchdog: prioritize stopping it over all else during reboot
A device hanging itself up during shutdown as part of a reboot is stupid. Therefore, the first to do when initiating a reboot is to stop the watchdog. The processes stopped before the watchdog where: K15svscanboot.sh -> ../init.d/svscanboot.sh K20dbus-1 -> ../init.d/dbus-1 K20dnsmasq -> ../init.d/dnsmasq K20hwclock.sh -> ../init.d/hwclock.sh K20resolv-watch -> ../init.d/resolv-watch K20syslog -> ../init.d/syslog K20watchdog -> ../init.d/watchdog With this commit its the first thing. Wouldn't this risk interrupting a reboot that was otherwise OK? No the kernel driver expects a write to the watchdog device every minute. The userland watchdog process updates the kernel every 10 seconds: stopping it therefore leaves at least 50 seconds for the device to reboot. Also add a message to the syslog, to make the log file clear: Aug 17 11:07:07 ccgx user.notice shutdown[2127]: shutting down for system reboot Aug 17 11:07:07 ccgx daemon.info init: Switching to runlevel: 6 Aug 17 11:07:07 ccgx user.notice root: Stopping watchdog (keeping hw watchdog alive) Aug 17 11:07:07 ccgx user.crit kernel: [ 236.577026] omap_wdt: Unexpected close, not stopping! closes victronenergy/venus#312
- Loading branch information