mirror of
https://github.com/troglobit/finit.git
synced 2026-11-03 13:28:27 +00:00
sig: avoid reading fstab during shutdown
Only fall back to the regular mount invocation when both fstab-independent root remount attempts fail. This avoids reading an encrypted fstab during a normal shutdown. Signed-off-by: Anees Rehman <anees.rehman@atlascopco.com>
This commit is contained in:
1 parent
417abf9000
commit
263ea929fd
1 file changed
+3
-3
@@ -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();
|
||||||
|
|||||||
Reference in new issue
Block a user