From 956af8f26e373316f863dfaa569ab04563667676 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Amadeusz=20=C5=BBo=C5=82nowski?= Date: Fri, 25 Mar 2011 15:56:51 +0100 Subject: [PATCH] dracut: new option: -M, --show-modules - lists modules on build Module name is printed to standard output before its inclusion. --- dracut | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dracut b/dracut index 48139e8..6b67dc0 100755 --- a/dracut +++ b/dracut @@ -106,6 +106,8 @@ Creates initial ramdisk images for preloading modules --no-compress Do not compress the generated initramfs. This will override any other compression options. --list-modules List all available dracut modules. + -M, --show-modules Print included module's name to standard output during + build. EOF } @@ -230,6 +232,9 @@ while (($# > 0)); do --list-modules) do_list="yes"; ;; + -M|--show-modules) + show_modules_l="yes" + ;; -*) printf "\nUnknown option: %s\n\n" "$1" >&2; usage; exit 1;; *) if ! [[ $outfile ]]; then @@ -347,6 +352,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l)) [[ $fw_dir ]] || fw_dir=/lib/firmware [[ $do_strip ]] || do_strip=no [[ $compress_l ]] && compress=$compress_l +[[ $show_modules_l ]] && show_modules=$show_modules_l # eliminate IFS hackery when messing with fw_dir fw_dir=${fw_dir//:/ } @@ -472,7 +478,8 @@ check_module_dir for moddir in "$dracutbasedir/modules.d"/[0-9][0-9]*; do mod=${moddir##*/}; mod=${mod#[0-9][0-9]} if strstr "$mods_to_load" " $mod "; then - dinfo "*** Including module: $mod ***" + [[ $show_modules = yes ]] && echo "$mod" || \ + dinfo "*** Including module: $mod ***" if [[ $kernel_only = yes ]]; then module_installkernel $mod else -- 2.7.4