]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
btrfs: fix two bugs in module-setup.sh
authorCong Wang <xiyou.wangcong@gmail.com>
Mon, 30 Jan 2012 09:58:55 +0000 (17:58 +0800)
committerHarald Hoyer <harald@redhat.com>
Tue, 7 Feb 2012 11:14:21 +0000 (12:14 +0100)
First, $host_fs_types is an array.
Second, use strstr to match btrfs type.

Cc: Harald Hoyer <harald@redhat.com>
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
modules.d/90btrfs/module-setup.sh

index a141dda7ecfe28018e66fe0bc4e03cd6d72f8d7c..135abc65bc0f7104c8ddd35bf734e9e72de8c117 100755 (executable)
@@ -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