From: Harald Hoyer <[email protected]> This patch series enables a clean disassemble of the root device in the shutdown process.
systemd-shutdown checks for /run/initramfs/shutdown, and if found, it will pivot_root to /run/initramfs and execute shutdown. Of course, this needs /run to be mounted without "noexec", which I do not consider a weak point in security. This works perfectly with dracut, which now has a shutdown script in latest git. Because the initramfs knows, how it assembled the root device, it can also disassemble it easily. To build a dracut initramfs with shutdown from the git HEAD do: $ ./dracut -l --add "shutdown" --prefix /run/initramfs <image> Harald Hoyer (6): umount: log_info about what we unmounted umount: umount, until all umounts failed umount: log failed umounts only once at the end missing.h: add MS_PRIVATE mount /run without "noexec" shutdown: pivot_root to a tmpfs directory to properly umount root src/missing.h | 4 ++ src/mount-setup.c | 2 +- src/nspawn.c | 2 +- src/shutdown.c | 102 +++++++++++++++++++++++++++++++++++++++++++++++++++++ src/umount.c | 17 +++++++-- 5 files changed, 122 insertions(+), 5 deletions(-) -- 1.7.5.2 _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
