Hi Dmitry,

Dmitry Bogatov <kact...@debian.org> writes:

> control: tags -1 +patch
>
> [2014-11-24 22:30] Petter Reinholdtsen <p...@hungry.com>
>> Given that -f is force only for ext*, I suspect a more sensible
>> approach is to only enable forcefsck for ext*, not disable it for
>> btrfs.
>
> Like this?
>
> diff --git a/debian/src/initscripts/etc/init.d/checkroot.sh 
> b/debian/src/initscripts/etc/init.d/checkroot.sh
> index 9f70527a..c6c21344 100755
> --- a/debian/src/initscripts/etc/init.d/checkroot.sh
> +++ b/debian/src/initscripts/etc/init.d/checkroot.sh
> @@ -22,6 +22,18 @@ FSCK_LOGFILE=/var/log/fsck/checkroot
>  . /lib/lsb/init-functions
>  . /lib/init/mount-functions.sh
>  
> +_want_force_fsck () {
> +     set -- $(findmnt / | tail -n1)
> +     case "$3" in
> +     # Only ext* file systems support `-f' option to fsck. See #686895
> +     (ext*)
> +             [ -f /forcefsck ] || grep -q -s -w -i "forcefsck" /proc/cmdline
> +             ;;
> +     (*)
> +             return 1

Do we need ';;' after this line?  Otherwise looks good to me.

> +     esac
> +}
> +

Yours,
Benda

Reply via email to