Skip to content

Commit 12beeac

Browse files
tpgxyzharaldh
authored andcommitted
fix(fs-lib): install fsck utilities
1 parent b12d91c commit 12beeac

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

Diff for: modules.d/99fs-lib/module-setup.sh

+9-8
Original file line numberDiff line numberDiff line change
@@ -67,22 +67,23 @@ install() {
6767
[[ $nofscks == "yes" ]] && return
6868

6969
if [[ $fscks == "${fscks#*[^ ]*}" ]]; then
70-
_helpers="\
71-
umount mount /sbin/fsck* /usr/sbin/fsck*
70+
_helpers=(
71+
/sbin/fsck* /usr/sbin/fsck*
7272
xfs_db xfs_check xfs_repair xfs_metadump
7373
e2fsck jfs_fsck reiserfsck btrfsck
74-
"
74+
)
7575
if [[ $hostonly ]]; then
76-
_helpers="umount mount "
77-
_helpers+=$(for_each_host_dev_fs echo_fs_helper)
76+
read -r -a _helpers < <(for_each_host_dev_fs echo_fs_helper)
7877
fi
7978
else
80-
_helpers="$fscks"
79+
read -r -a _helpers <<< "$fscks"
8180
fi
8281

83-
if [[ $_helpers == *e2fsck* ]] && [[ -e $dracutsysrootdir/etc/e2fsck.conf ]]; then
82+
_helpers+=(umount mount)
83+
84+
if [[ ${_helpers[*]} == *e2fsck* ]] && [[ -e $dracutsysrootdir/etc/e2fsck.conf ]]; then
8485
inst_simple /etc/e2fsck.conf
8586
fi
8687

87-
inst_multiple -o "$_helpers" fsck
88+
inst_multiple -o "${_helpers[@]}" fsck
8889
}

0 commit comments

Comments
 (0)