Codebase list sysvinit / d55345f
Use forced fsck in mountroot.sh only if it is supported (Closes: #686895) Dmitry Bogatov 5 years ago
2 changed file(s) with 15 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
55 * Update path to `nologin' file in `bootmisc.sh' script (Closes: #743743)
66 * Fix mounting of /proc on Hurd (Closes: #814735)
77 * Fix /sbin/poweroff alternative on Hurd (Closes: #825975)
8 * Use forced fsck in mountroot.sh only if it is supported (Closes: #686895)
89
910 -- Dmitry Bogatov <KAction@debian.org> Thu, 27 Dec 2018 10:06:16 +0000
1011
2020
2121 . /lib/lsb/init-functions
2222 . /lib/init/mount-functions.sh
23
24 _want_force_fsck () {
25 case "$(findmnt -n -o FSTYPE /)" in
26 # Only ext* file systems support `-f' option to fsck. See #686895
27 (ext*)
28 [ -f /forcefsck ] || grep -q -s -w -i "forcefsck" /proc/cmdline
29 ;;
30 (*)
31 return 1
32 ;;
33 esac
34 }
2335
2436 do_start () {
2537 # Trap SIGINT so that we can handle user interrupt of fsck.
202214 #
203215 if [ "$rootcheck" = yes ]
204216 then
205 if [ -f /forcefsck ] || grep -q -s -w -i "forcefsck" /proc/cmdline
206 then
207 force="-f"
208 else
209 force=""
210 fi
217 force=""
218 _want_force_fsck && force="-f"
211219
212220 if [ "$FSCKFIX" = yes ]
213221 then