From 263ea929fd9c3a143b26bf9327b242cd939cfaf0 Mon Sep 17 00:00:00 2001 From: Anees Rehman Date: Fri, 25 Sep 2026 16:39:01 +0200 Subject: [PATCH] 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 --- src/sig.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sig.c b/src/sig.c index bdfc65b4..30924b08 100644 --- a/src/sig.c +++ b/src/sig.c @@ -391,9 +391,9 @@ void do_shutdown(shutop_t op) * - https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/29187 */ sync(); - 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"); + 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 /", "mount"); /* Call mdadm to mark any RAID array(s) as clean before halting. */ mdadm_wait();