From: Cong Wang Date: Mon, 30 Jan 2012 09:58:55 +0000 (+0800) Subject: btrfs: fix two bugs in module-setup.sh X-Git-Tag: 015~24 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=418febfc4439cea5c5ab728bdd3e45e7705bd7a3;p=thirdparty%2Fdracut.git btrfs: fix two bugs in module-setup.sh First, $host_fs_types is an array. Second, use strstr to match btrfs type. Cc: Harald Hoyer Signed-off-by: WANG Cong --- diff --git a/modules.d/90btrfs/module-setup.sh b/modules.d/90btrfs/module-setup.sh index a141dda7e..135abc65b 100755 --- a/modules.d/90btrfs/module-setup.sh +++ b/modules.d/90btrfs/module-setup.sh @@ -13,8 +13,8 @@ check() { [[ $hostonly ]] || [[ $mount_needs ]] && { local _found - for fs in $host_fs_types; do - [[ "$fs" = "|btrfs" ]] && _found="1" + for fs in ${host_fs_types[@]}; do + strstr "$fs" "\|btrfs" && _found="1" done [[ $_found ]] || return 1 unset _found