Browse Source

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 <harald@redhat.com>
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
master
Cong Wang 13 years ago committed by Harald Hoyer
parent
commit
418febfc44
  1. 4
      modules.d/90btrfs/module-setup.sh

4
modules.d/90btrfs/module-setup.sh

@ -13,8 +13,8 @@ check() { @@ -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

Loading…
Cancel
Save