Ignore errors from the first two remount,ro they are just decoys

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2022-04-12 22:28:10 +02:00
parent c8c5e4e88a
commit 70e1aa889a
+8 -3
View File
@@ -328,10 +328,15 @@ void do_shutdown(shutop_t op)
/* ... unmount remaining regular file systems. */
unmount_regular();
/* We sit on / so we must remount it ro, try all the things! */
/*
* We sit on / so we must remount it ro, try all the things!
* See the following links for details:
* - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=339023
* - https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/29187
*/
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 -t dummytype dummydev /", NULL);
run("mount -n -o remount,ro dummydev /", NULL);
run("mount -n -o remount,ro /", "mount");
/* Call mdadm to mark any RAID array(s) as clean before halting. */