|
Harald Hoyer |
a66b47 |
From 0f283709c9bbcdc064e1212c42173a3ff9552525 Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
a66b47 |
From: Harald Hoyer <harald@redhat.com>
|
|
Harald Hoyer |
a66b47 |
Date: Mon, 16 Jul 2012 12:21:56 +0200
|
|
Harald Hoyer |
a66b47 |
Subject: [PATCH] dracut-functions.sh: output more info, if dependency modules
|
|
Harald Hoyer |
a66b47 |
are omitted
|
|
Harald Hoyer |
a66b47 |
|
|
Harald Hoyer |
a66b47 |
---
|
|
Harald Hoyer |
a66b47 |
dracut-functions.sh | 20 ++++++++++++++++----
|
|
Harald Hoyer |
a66b47 |
1 file changed, 16 insertions(+), 4 deletions(-)
|
|
Harald Hoyer |
a66b47 |
|
|
Harald Hoyer |
a66b47 |
diff --git a/dracut-functions.sh b/dracut-functions.sh
|
|
Harald Hoyer |
a66b47 |
index 3f56316..306b93a 100755
|
|
Harald Hoyer |
a66b47 |
--- a/dracut-functions.sh
|
|
Harald Hoyer |
a66b47 |
+++ b/dracut-functions.sh
|
|
Harald Hoyer |
a66b47 |
@@ -1024,7 +1024,10 @@ check_mount() {
|
|
Harald Hoyer |
a66b47 |
|
|
Harald Hoyer |
a66b47 |
[[ $2 ]] || mods_checked_as_dep+=" $_mod "
|
|
Harald Hoyer |
a66b47 |
|
|
Harald Hoyer |
a66b47 |
- strstr " $omit_dracutmodules " " $_mod " && return 1
|
|
Harald Hoyer |
a66b47 |
+ if strstr " $omit_dracutmodules " " $_mod "; then
|
|
Harald Hoyer |
a66b47 |
+ dinfo "Dracut module '$_mod' will not be installed, because it's in the list to be omitted!"
|
|
Harald Hoyer |
a66b47 |
+ return 1
|
|
Harald Hoyer |
a66b47 |
+ fi
|
|
Harald Hoyer |
a66b47 |
|
|
Harald Hoyer |
a66b47 |
if [ "${#host_fs_types[*]}" -gt 0 ]; then
|
|
Harald Hoyer |
a66b47 |
module_check_mount $_mod || return 1
|
|
Harald Hoyer |
a66b47 |
@@ -1040,7 +1043,10 @@ check_mount() {
|
|
Harald Hoyer |
a66b47 |
strstr " $force_add_dracutmodules " " $_moddep " || \
|
|
Harald Hoyer |
a66b47 |
force_add_dracutmodules+=" $_moddep "
|
|
Harald Hoyer |
a66b47 |
# if a module we depend on fail, fail also
|
|
Harald Hoyer |
a66b47 |
- check_module $_moddep || return 1
|
|
Harald Hoyer |
a66b47 |
+ if ! check_module $_moddep; then
|
|
Harald Hoyer |
a66b47 |
+ derror "Dracut module '$_mod' depends on '$_moddep', which can't be installed"
|
|
Harald Hoyer |
a66b47 |
+ return 1
|
|
Harald Hoyer |
a66b47 |
+ fi
|
|
Harald Hoyer |
a66b47 |
done
|
|
Harald Hoyer |
a66b47 |
|
|
Harald Hoyer |
a66b47 |
strstr " $mods_to_load " " $_mod " || \
|
|
Harald Hoyer |
a66b47 |
@@ -1067,7 +1073,10 @@ check_module() {
|
|
Harald Hoyer |
a66b47 |
|
|
Harald Hoyer |
a66b47 |
[[ $2 ]] || mods_checked_as_dep+=" $_mod "
|
|
Harald Hoyer |
a66b47 |
|
|
Harald Hoyer |
a66b47 |
- strstr " $omit_dracutmodules " " $_mod " && return 1
|
|
Harald Hoyer |
a66b47 |
+ if strstr " $omit_dracutmodules " " $_mod "; then
|
|
Harald Hoyer |
a66b47 |
+ dinfo "Dracut module '$_mod' will not be installed, because it's in the list to be omitted!"
|
|
Harald Hoyer |
a66b47 |
+ return 1
|
|
Harald Hoyer |
a66b47 |
+ fi
|
|
Harald Hoyer |
a66b47 |
|
|
Harald Hoyer |
a66b47 |
if strstr " $dracutmodules $add_dracutmodules $force_add_dracutmodules" " $_mod "; then
|
|
Harald Hoyer |
a66b47 |
if strstr " $force_add_dracutmodules" " $_mod"; then
|
|
Harald Hoyer |
a66b47 |
@@ -1095,7 +1104,10 @@ check_module() {
|
|
Harald Hoyer |
a66b47 |
strstr " $force_add_dracutmodules " " $_moddep " || \
|
|
Harald Hoyer |
a66b47 |
force_add_dracutmodules+=" $_moddep "
|
|
Harald Hoyer |
a66b47 |
# if a module we depend on fail, fail also
|
|
Harald Hoyer |
a66b47 |
- check_module $_moddep || return 1
|
|
Harald Hoyer |
a66b47 |
+ if ! check_module $_moddep; then
|
|
Harald Hoyer |
a66b47 |
+ derror "Dracut module '$_mod' depends on '$_moddep', which can't be installed"
|
|
Harald Hoyer |
a66b47 |
+ return 1
|
|
Harald Hoyer |
a66b47 |
+ fi
|
|
Harald Hoyer |
a66b47 |
done
|
|
Harald Hoyer |
a66b47 |
|
|
Harald Hoyer |
a66b47 |
strstr " $mods_to_load " " $_mod " || \
|