From: Harald Hoyer Date: Thu, 2 Jul 2009 09:32:32 +0000 (+0200) Subject: add --add option to add modules to the "all" list X-Git-Tag: 0.3~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3e17f33b27975d759cc70e0b1daf1920ea87cd0e;p=platform%2Fupstream%2Fdracut.git add --add option to add modules to the "all" list --- diff --git a/dracut b/dracut index f10af83..826fbda 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 d1c161d..fbecfcd 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 }