|
|
712866 |
From 815ab93fe9f57aa3e17066d9564ce5350f95b35a Mon Sep 17 00:00:00 2001
|
|
|
712866 |
From: Harald Hoyer <harald@redhat.com>
|
|
|
712866 |
Date: Fri, 12 Sep 2014 10:19:28 +0200
|
|
|
712866 |
Subject: [PATCH] dracut-functions.sh: exit for missing --force-add or --add
|
|
|
712866 |
dracut modules
|
|
|
712866 |
|
|
|
712866 |
Better exit with fail early, so there is no surprise on reboot.
|
|
|
712866 |
|
|
|
712866 |
(cherry picked from commit a49cac2e65eb1beb8b0442b74aaa4851d184c0ce)
|
|
|
712866 |
---
|
|
|
712866 |
dracut-functions.sh | 10 ++++++++--
|
|
|
712866 |
1 file changed, 8 insertions(+), 2 deletions(-)
|
|
|
712866 |
|
|
|
712866 |
diff --git a/dracut-functions.sh b/dracut-functions.sh
|
|
|
5c6c2a |
index 8a0cd301..6e0b44ae 100755
|
|
|
712866 |
--- a/dracut-functions.sh
|
|
|
712866 |
+++ b/dracut-functions.sh
|
|
|
712866 |
@@ -1314,11 +1314,17 @@ for_each_module_dir() {
|
|
|
712866 |
|
|
|
712866 |
# Report any missing dracut modules, the user has specified
|
|
|
712866 |
_modcheck="$add_dracutmodules $force_add_dracutmodules"
|
|
|
712866 |
- [[ $dracutmodules != all ]] && _modcheck="$m $dracutmodules"
|
|
|
712866 |
+ [[ $dracutmodules != all ]] && _modcheck="$_modcheck $dracutmodules"
|
|
|
712866 |
for _mod in $_modcheck; do
|
|
|
712866 |
[[ " $mods_to_load " == *\ $_mod\ * ]] && continue
|
|
|
712866 |
- [[ " $omit_dracutmodules " == *\ $_mod\ * ]] && continue
|
|
|
712866 |
+
|
|
|
712866 |
+ [[ " $force_add_dracutmodules " != *\ $_mod\ * ]] \
|
|
|
712866 |
+ && [[ " $omit_dracutmodules " == *\ $_mod\ * ]] \
|
|
|
712866 |
+ && continue
|
|
|
712866 |
+
|
|
|
712866 |
derror "dracut module '$_mod' cannot be found or installed."
|
|
|
712866 |
+ [[ " $force_add_dracutmodules " == *\ $_mod\ * ]] && exit 1
|
|
|
712866 |
+ [[ " $add_dracutmodules " == *\ $_mod\ * ]] && exit 1
|
|
|
712866 |
done
|
|
|
712866 |
}
|
|
|
712866 |
|