From: Tomasz Paweł Gajc Date: Sat, 22 May 2021 10:01:19 +0000 (+0200) Subject: fix(fs-lib): install fsck utilities X-Git-Tag: 055~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=12beeac741e4429146a674ef4ea9aa0bac10364b;p=thirdparty%2Fdracut.git fix(fs-lib): install fsck utilities --- diff --git a/modules.d/99fs-lib/module-setup.sh b/modules.d/99fs-lib/module-setup.sh index efafa5383..2b81b0c45 100755 --- a/modules.d/99fs-lib/module-setup.sh +++ b/modules.d/99fs-lib/module-setup.sh @@ -67,22 +67,23 @@ install() { [[ $nofscks == "yes" ]] && return if [[ $fscks == "${fscks#*[^ ]*}" ]]; then - _helpers="\ - umount mount /sbin/fsck* /usr/sbin/fsck* + _helpers=( + /sbin/fsck* /usr/sbin/fsck* xfs_db xfs_check xfs_repair xfs_metadump e2fsck jfs_fsck reiserfsck btrfsck - " + ) if [[ $hostonly ]]; then - _helpers="umount mount " - _helpers+=$(for_each_host_dev_fs echo_fs_helper) + read -r -a _helpers < <(for_each_host_dev_fs echo_fs_helper) fi else - _helpers="$fscks" + read -r -a _helpers <<< "$fscks" fi - if [[ $_helpers == *e2fsck* ]] && [[ -e $dracutsysrootdir/etc/e2fsck.conf ]]; then + _helpers+=(umount mount) + + if [[ ${_helpers[*]} == *e2fsck* ]] && [[ -e $dracutsysrootdir/etc/e2fsck.conf ]]; then inst_simple /etc/e2fsck.conf fi - inst_multiple -o "$_helpers" fsck + inst_multiple -o "${_helpers[@]}" fsck }