diff options
Diffstat (limited to 'modules.d/98dracut-systemd')
-rwxr-xr-x | modules.d/98dracut-systemd/dracut-cmdline-ask.sh | 2 | ||||
-rw-r--r-- | modules.d/98dracut-systemd/dracut-shutdown.service.8.asc | 19 |
2 files changed, 14 insertions, 7 deletions
diff --git a/modules.d/98dracut-systemd/dracut-cmdline-ask.sh b/modules.d/98dracut-systemd/dracut-cmdline-ask.sh index 13c4f20..895cd90 100755 --- a/modules.d/98dracut-systemd/dracut-cmdline-ask.sh +++ b/modules.d/98dracut-systemd/dracut-cmdline-ask.sh @@ -14,6 +14,8 @@ echo echo echo echo "Enter additional kernel command line parameter (end with ctrl-d or .)" +# In POSIX sh, read -p is undefined, but dash supports it +# shellcheck disable=SC3045 while read -r -p "> " ${BASH:+-e} line || [ -n "$line" ]; do [ "$line" = "." ] && break [ -n "$line" ] && printf -- "%s\n" "$line" >> /etc/cmdline.d/99-cmdline-ask.conf diff --git a/modules.d/98dracut-systemd/dracut-shutdown.service.8.asc b/modules.d/98dracut-systemd/dracut-shutdown.service.8.asc index 21ec88c..1e9f88c 100644 --- a/modules.d/98dracut-systemd/dracut-shutdown.service.8.asc +++ b/modules.d/98dracut-systemd/dracut-shutdown.service.8.asc @@ -20,15 +20,20 @@ can be safely unmounted. The following steps are executed during a shutdown: -* systemd switches to the shutdown.target -* systemd starts /lib/systemd/system/shutdown.target.wants/dracut-shutdown.service -* dracut-shutdown.service executes /usr/lib/dracut/dracut-initramfs-restore which unpacks the initramfs to /run/initramfs -* systemd finishes shutdown.target +* The system starts to shut down +* ``$prefix/lib/systemd/system/sysinit.target.wants/dracut-shutdown.service`` + gets its ``ExecStop`` target triggered. +* ``dracut-shutdown.service`` executes + ``/usr/lib/dracut/dracut-initramfs-restore`` which unpacks the initramfs to + ``/run/initramfs`` * systemd kills all processes * systemd tries to unmount everything and mounts the remaining read-only -* systemd checks, if there is a /run/initramfs/shutdown executable -* if yes, it does a pivot_root to /run/initramfs and executes ./shutdown. The old root is then mounted on /oldroot. /usr/lib/dracut/modules.d/99shutdown/shutdown.sh is the shutdown executable. -* shutdown will try to umount every /oldroot mount and calls the various shutdown hooks from the dracut modules +* systemd checks if there is a ``/run/initramfs/shutdown`` executable +* if yes, it does a pivot_root to ``/run/initramfs`` and executes ``./shutdown``. + The old root is then mounted on ``/oldroot``. + ``/usr/lib/dracut/modules.d/99shutdown/shutdown.sh`` is the shutdown executable. +* shutdown will try to unmount every ``/oldroot`` mount and calls the various + shutdown hooks from the dracut modules This ensures, that all devices are disassembled and unmounted cleanly. |