|
Harald Hoyer |
45974b |
From fd191a7b41b0f402e8c36f692b5f1b5e9eb8b035 Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
45974b |
From: Harald Hoyer <harald@redhat.com>
|
|
Harald Hoyer |
45974b |
Date: Mon, 18 Mar 2013 08:43:23 +0100
|
|
Harald Hoyer |
45974b |
Subject: [PATCH] kernel-modules/module-setup.sh: install all host filesystem
|
|
Harald Hoyer |
45974b |
drivers
|
|
Harald Hoyer |
45974b |
|
|
Harald Hoyer |
45974b |
https://bugzilla.redhat.com/show_bug.cgi?id=922565
|
|
Harald Hoyer |
45974b |
---
|
|
Harald Hoyer |
45974b |
dracut-functions.sh | 14 ++++++++++++++
|
|
Harald Hoyer |
45974b |
modules.d/90kernel-modules/module-setup.sh | 8 +++-----
|
|
Harald Hoyer |
45974b |
2 files changed, 17 insertions(+), 5 deletions(-)
|
|
Harald Hoyer |
45974b |
|
|
Harald Hoyer |
45974b |
diff --git a/dracut-functions.sh b/dracut-functions.sh
|
|
Harald Hoyer |
45974b |
index c6a5c7e..eba7412 100755
|
|
Harald Hoyer |
45974b |
--- a/dracut-functions.sh
|
|
Harald Hoyer |
45974b |
+++ b/dracut-functions.sh
|
|
Harald Hoyer |
45974b |
@@ -457,12 +457,20 @@ for_each_host_dev_fs()
|
|
Harald Hoyer |
45974b |
local _func="$1"
|
|
Harald Hoyer |
45974b |
local _dev
|
|
Harald Hoyer |
45974b |
local _ret=1
|
|
Harald Hoyer |
45974b |
+
|
|
Harald Hoyer |
45974b |
+ [[ "${!host_fs_types[@]}" ]] || return 0
|
|
Harald Hoyer |
45974b |
+
|
|
Harald Hoyer |
45974b |
for _dev in "${!host_fs_types[@]}"; do
|
|
Harald Hoyer |
45974b |
$_func "$_dev" "${host_fs_types[$_dev]}" && _ret=0
|
|
Harald Hoyer |
45974b |
done
|
|
Harald Hoyer |
45974b |
return $_ret
|
|
Harald Hoyer |
45974b |
}
|
|
Harald Hoyer |
45974b |
|
|
Harald Hoyer |
45974b |
+host_fs_all()
|
|
Harald Hoyer |
45974b |
+{
|
|
Harald Hoyer |
45974b |
+ echo "${host_fs_types[@]}"
|
|
Harald Hoyer |
45974b |
+}
|
|
Harald Hoyer |
45974b |
+
|
|
Harald Hoyer |
45974b |
# Walk all the slave relationships for a given block device.
|
|
Harald Hoyer |
45974b |
# Stop when our helper function returns success
|
|
Harald Hoyer |
45974b |
# $1 = function to call on every found block device
|
|
Harald Hoyer |
45974b |
@@ -508,6 +516,9 @@ for_each_host_dev_and_slaves_all()
|
|
Harald Hoyer |
45974b |
local _func="$1"
|
|
Harald Hoyer |
45974b |
local _dev
|
|
Harald Hoyer |
45974b |
local _ret=1
|
|
Harald Hoyer |
45974b |
+
|
|
Harald Hoyer |
45974b |
+ [[ "${host_devs[@]}" ]] || return 0
|
|
Harald Hoyer |
45974b |
+
|
|
Harald Hoyer |
45974b |
for _dev in ${host_devs[@]}; do
|
|
Harald Hoyer |
45974b |
[[ -b "$_dev" ]] || continue
|
|
Harald Hoyer |
45974b |
if check_block_and_slaves_all $_func $(get_maj_min $_dev); then
|
|
Harald Hoyer |
45974b |
@@ -521,6 +532,9 @@ for_each_host_dev_and_slaves()
|
|
Harald Hoyer |
45974b |
{
|
|
Harald Hoyer |
45974b |
local _func="$1"
|
|
Harald Hoyer |
45974b |
local _dev
|
|
Harald Hoyer |
45974b |
+
|
|
Harald Hoyer |
45974b |
+ [[ "${host_devs[@]}" ]] || return 0
|
|
Harald Hoyer |
45974b |
+
|
|
Harald Hoyer |
45974b |
for _dev in ${host_devs[@]}; do
|
|
Harald Hoyer |
45974b |
[[ -b "$_dev" ]] || continue
|
|
Harald Hoyer |
45974b |
check_block_and_slaves $_func $(get_maj_min $_dev) && return 0
|
|
Harald Hoyer |
45974b |
diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh
|
|
Harald Hoyer |
45974b |
index 7d7da83..bd35a2c 100755
|
|
Harald Hoyer |
45974b |
--- a/modules.d/90kernel-modules/module-setup.sh
|
|
Harald Hoyer |
45974b |
+++ b/modules.d/90kernel-modules/module-setup.sh
|
|
Harald Hoyer |
45974b |
@@ -65,11 +65,9 @@ installkernel() {
|
|
Harald Hoyer |
45974b |
instmods '=fs'
|
|
Harald Hoyer |
45974b |
fi
|
|
Harald Hoyer |
45974b |
else
|
|
Harald Hoyer |
45974b |
- inst_fs() {
|
|
Harald Hoyer |
45974b |
- [[ $2 ]] || return 1
|
|
Harald Hoyer |
45974b |
- hostonly='' instmods $2
|
|
Harald Hoyer |
45974b |
- }
|
|
Harald Hoyer |
45974b |
- for_each_host_dev_fs inst_fs
|
|
Harald Hoyer |
45974b |
+ for i in $(host_fs_all); do
|
|
Harald Hoyer |
45974b |
+ hostonly='' instmods $i
|
|
Harald Hoyer |
45974b |
+ done
|
|
Harald Hoyer |
45974b |
fi
|
|
Harald Hoyer |
45974b |
fi
|
|
Harald Hoyer |
45974b |
}
|