Bug#783410: [PATCH] Support fsck.mode= and fsck.repair= parameters as known by systemd-fsck
From: Laurent Bigonville <bigon@bigon.be>
This is also fixing the fact that fsckfix parameter was not honored
Note that -n is apparently not supported by fsck.minix
Closes: #783410 #792557
Signed-off-by: Laurent Bigonville <bigon@bigon.be>
---
init | 11 +++++++----
scripts/functions | 5 ++++-
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/init b/init
index abf7f25..6f41a7b 100755
--- a/init
+++ b/init
@@ -61,7 +61,7 @@ export resume_offset=
export drop_caps=
export fastboot=n
export forcefsck=n
-export fsckfix=n
+export fsckfix=
# Bring in the main config
@@ -169,15 +169,18 @@ for x in $(cat /proc/cmdline); do
BOOTIF=*)
BOOTIF=${x#BOOTIF=}
;;
- fastboot)
+ fastboot|fsck.mode=skip)
fastboot=y
;;
- forcefsck)
+ forcefsck|fsck.mode=force)
forcefsck=y
;;
- fsckfix)
+ fsckfix|fsck.repair=yes)
fsckfix=y
;;
+ fsck.repair=no)
+ fsckfix=n
+ ;;
esac
done
diff --git a/scripts/functions b/scripts/functions
index 8c1bb1f..a347264 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -358,9 +358,12 @@ _checkfs_once()
force=""
fi
- if [ "$fsckfix" = yes ]
+ if [ "$fsckfix" = "y" ]
then
fix="-y"
+ elif [ "$fsckfix" = "n" ]
+ then
+ fix="-n"
else
fix="-a"
fi
--
2.6.2
Reply to: