Revert "Simplify shutdown, no need for workarounds to remount / read-only"

This reverts commit 7c42986800 since we
seem to still need this werid thing on some systems.  The key seems
to use 'any' device at remount[1].  Anyway, the key issue before was
the noisy output, but like Debian we'll just redirect to /dev/null.

[1]: https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/29187

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2022-04-12 22:22:18 +02:00
parent 86c1398778
commit c8c5e4e88a
+5 -2
View File
@@ -328,8 +328,11 @@ void do_shutdown(shutop_t op)
/* ... unmount remaining regular file systems. */
unmount_regular();
/* We sit on / so we must remount it read-only */
run("mount -n -o remount,ro -t none rootfs /", "mount");
/* We sit on / so we must remount it ro, try all the things! */
sync();
run("mount -n -o remount,ro -t dummytype dummydev /", "mount");
run("mount -n -o remount,ro dummydev /", "mount");
run("mount -n -o remount,ro /", "mount");
/* Call mdadm to mark any RAID array(s) as clean before halting. */
mdadm_wait();