From fd191a7b41b0f402e8c36f692b5f1b5e9eb8b035 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 18 Mar 2013 08:43:23 +0100 Subject: [PATCH] kernel-modules/module-setup.sh: install all host filesystem drivers https://bugzilla.redhat.com/show_bug.cgi?id=922565 --- dracut-functions.sh | 14 ++++++++++++++ modules.d/90kernel-modules/module-setup.sh | 8 +++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/dracut-functions.sh b/dracut-functions.sh index c6a5c7e..eba7412 100755 --- a/dracut-functions.sh +++ b/dracut-functions.sh @@ -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 diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh index 7d7da83..bd35a2c 100755 --- a/modules.d/90kernel-modules/module-setup.sh +++ b/modules.d/90kernel-modules/module-setup.sh @@ -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 }