From 3e17f33b27975d759cc70e0b1daf1920ea87cd0e Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 2 Jul 2009 11:32:32 +0200 Subject: [PATCH] add --add option to add modules to the "all" list --- dracut | 3 +++ dracut-functions | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dracut b/dracut index f10af831..826fbda9 100755 --- a/dracut +++ b/dracut @@ -19,6 +19,7 @@ Creates initial ramdisk images for preloading modules call when building the initramfs. Modules are located in /usr/share/dracut/modules.d. -o, --omit [LIST] Omit a space-separated list of dracut modules. + -a, --add [LIST] Add a space-separated list of dracut modules. -d, --drivers [LIST] Specify a space-separated list of kernel modules to include in the initramfs. -h, --help This message @@ -45,6 +46,7 @@ while (($# > 0)); do -f|--force) force=yes;; -m|--modules) dracutmodules_l="$2"; shift;; -o|--omit) omit_dracutmodules_l="$2"; shift;; + -a|--add) add_dracutmodules_l="$2"; shift;; -d|--drivers) drivers_l="$2"; shift;; -h|--help) usage; exit 1 ;; --debug) debug="yes";; @@ -73,6 +75,7 @@ done # these options override the stuff in the config file [[ $dracutmodules_l ]] && dracutmodules=$dracutmodules_l [[ $omit_dracutmodules_l ]] && omit_dracutmodules=$omit_dracutmodules_l +[[ $add_dracutmodules_l ]] && add_dracutmodules="$add_dracutmodules $add_dracutmodules_l" [[ $drivers_l ]] && drivers=$drivers_l [[ $dracutbasedir ]] || dracutbasedir=/usr/share/dracut diff --git a/dracut-functions b/dracut-functions index d1c161dd..fbecfcd9 100755 --- a/dracut-functions +++ b/dracut-functions @@ -257,7 +257,8 @@ check_modules() { [[ $dracutmodules != all ]] && ! strstr "$dracutmodules" "$mod" && \ continue strstr "$omit_dracutmodules" "$mod" && continue - should_source_module "$moddir" || continue + strstr "$add_dracutmodules" " $mod " \ + || should_source_module "$moddir" || continue mods_to_load+=" $mod " done } -- 2.11.4.GIT