for the host-only initramfs, check all relevant disks for the
filesystem type and only include those fsck tools, which are needed.
xfs_db xfs_check xfs_repair
e2fsck jfs_fsck reiserfsck btrfsck
"
+ if [[ $hostonly ]]; then
+ print_fs_type() { get_fs_type /dev/block/$1; }
+ _rootdev=$(find_root_block_device)
+ if [[ $_rootdev ]]; then
+ _helpers="umount mount "
+ for fs in $(check_block_and_slaves print_fs_type "$_rootdev"); do
+ case "$fs" in
+ xfs)
+ _helpers+=" xfs_db xfs_repair xfs_check "
+ ;;
+ ext?)
+ _helpers+=" e2fsck "
+ ;;
+ jfs)
+ _helpers+=" jfs_fsck "
+ ;;
+ reiserfs)
+ _helpers+=" reiserfsck "
+ ;;
+ btrfs)
+ _helpers+=" btrfsck "
+ ;;
+ *)
+ [[ -x fsck.$fs ]] && _helpers+= " fsck.$fs "
+ ;;
+ esac
+ done
+ fi
+ fi
else
_helpers="$fscks"
fi