From 418febfc4439cea5c5ab728bdd3e45e7705bd7a3 Mon Sep 17 00:00:00 2001 From: Cong Wang Date: Mon, 30 Jan 2012 17:58:55 +0800 Subject: [PATCH] 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 --- modules.d/90btrfs/module-setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules.d/90btrfs/module-setup.sh b/modules.d/90btrfs/module-setup.sh index a141dda7..135abc65 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