]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
kernel-modules/module-setup.sh: install all host filesystem drivers
authorHarald Hoyer <harald@redhat.com>
Mon, 18 Mar 2013 07:43:23 +0000 (08:43 +0100)
committerHarald Hoyer <harald@redhat.com>
Mon, 18 Mar 2013 07:43:23 +0000 (08:43 +0100)
https://bugzilla.redhat.com/show_bug.cgi?id=922565

dracut-functions.sh
modules.d/90kernel-modules/module-setup.sh

index c6a5c7ebee9ae4df515d85bc9046e14d6da16484..eba7412edc4360fc9a467a9d55a58bce1742a38a 100755 (executable)
@@ -457,12 +457,20 @@ for_each_host_dev_fs()
     local _func="$1"
     local _dev
     local _ret=1
+
+    [[ "${!host_fs_types[@]}" ]] || return 0
+
     for _dev in "${!host_fs_types[@]}"; do
         $_func "$_dev" "${host_fs_types[$_dev]}" && _ret=0
     done
     return $_ret
 }
 
+host_fs_all()
+{
+    echo "${host_fs_types[@]}"
+}
+
 # Walk all the slave relationships for a given block device.
 # Stop when our helper function returns success
 # $1 = function to call on every found block device
@@ -508,6 +516,9 @@ for_each_host_dev_and_slaves_all()
     local _func="$1"
     local _dev
     local _ret=1
+
+    [[ "${host_devs[@]}" ]] || return 0
+
     for _dev in ${host_devs[@]}; do
         [[ -b "$_dev" ]] || continue
         if check_block_and_slaves_all $_func $(get_maj_min $_dev); then
@@ -521,6 +532,9 @@ for_each_host_dev_and_slaves()
 {
     local _func="$1"
     local _dev
+
+    [[ "${host_devs[@]}" ]] || return 0
+
     for _dev in ${host_devs[@]}; do
         [[ -b "$_dev" ]] || continue
         check_block_and_slaves $_func $(get_maj_min $_dev) && return 0
index 7d7da832a57cd430319f0a3594ce5c68f6515ba4..bd35a2cff7c97b58547cc5e4039984a973206864 100755 (executable)
@@ -65,11 +65,9 @@ installkernel() {
                     instmods '=fs'
             fi
         else
-            inst_fs() {
-                [[ $2 ]] || return 1
-                hostonly='' instmods $2
-            }
-            for_each_host_dev_fs inst_fs
+            for i in $(host_fs_all); do
+                hostonly='' instmods $i
+            done
         fi
     fi
 }