Age | Commit message (Collapse) | Author |
|
This adds minimal hardware watchdog support to PID 1. The idea is that
PID 1 supervises and watchdogs system services, while the hardware
watchdog is used to supervise PID 1.
This adds two hardware watchdog configuration options, for the runtime
watchdog and for a shutdown watchdog. The former is active during normal
operation, the latter only at reboots to ensure that if a clean reboot
times out we reboot nonetheless.
If the runtime watchdog is enabled PID 1 will automatically wake up at
half the configured interval and write to the watchdog daemon.
By default we enable the shutdown watchdog, but leave the runtime
watchdog disabled in order not to break independent hardware watchdog
daemons people might be using.
This is only the most basic hookup. If necessary we can later on hook
up the watchdog ping more closely with services deemed crucial.
|
|
|
|
|
|
|
|
in all binaries, in order to make sure it is set when started from the terminal
|
|
If we need to retry, we print things like
'Not all file systems unmounted, 1 left'
We should also print something after we succeeded, so we don't leave
the impression we left stuff behind.
|
|
|
|
Thanks Kay Sievers!
|
|
make_stdio itsselves closes the fd already
|
|
|
|
check for /run/initramfs/shutdown
mount bind all needed dirs to /run/initramfs
pivot_root to /run/initramfs
execute /run/initramfs/shutdown
|
|
|
|
|
|
Just some lame spelling corrections with no functionality.
|
|
before invoking reboot()
|
|
The kexec man page is awful and misleading.
|
|
|
|
|
|
|
|
|
|
immediately when we are stuck
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This functions are working as follows:
- Send a SIGTERM to all processes that may be finished
- Send a SIGKILL to all processes that still live and may be finished
- Try to unmount all mount points
- Try to remount read-only all mount points that can't be umounted
- Umount all swap devices
- Umount and detach all loopback devices
- Call [poweroff|halt|reboot|kexec]
TODO:
- Umount device-mapper.
- Make log work. So far it is being useless as we do not parse
/etc/systemd/system.conf, kernel command line but just
environment, however we're executed by init and thus have no
useful variables. Forcing it to target=kmsg/console and
level=debug also does not produce any output, however writing to
/dev/console does work (hack used during debug).
|