Merge pull request #508 from anees-r3hman/avoid-fstab-on-root-remount

sig: avoid reading fstab during shutdown
This commit is contained in:
Joachim Wiberg authored and GitHub committed 2026-09-27 17:58:33 +02:00
commit 1b10c3746e
1 file changed
+3 -3
+3 -3
View File
@@ -391,9 +391,9 @@ void do_shutdown(shutop_t op)
* - https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/29187 * - https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/29187
*/ */
sync(); sync();
run("mount -n -o remount,ro -t dummytype dummydev /", NULL); if (run("mount -n -o remount,ro -t dummytype dummydev /", NULL) &&
run("mount -n -o remount,ro dummydev /", NULL); run("mount -n -o remount,ro dummydev /", NULL))
run("mount -n -o remount,ro /", "mount"); run("mount -n -o remount,ro /", "mount");
/* Call mdadm to mark any RAID array(s) as clean before halting. */ /* Call mdadm to mark any RAID array(s) as clean before halting. */
mdadm_wait(); mdadm_wait();