mirror of
https://salsa.debian.org/kernel-team/initramfs-tools.git
synced 2026-01-26 15:39:08 +00:00
Support fsck.mode= and fsck.repair= parameters as known by systemd-fsck
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> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This commit is contained in:
parent
41eb6ac420
commit
27405fc423
11
init
11
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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user