From 7737a58e7efb858e3cd89ee3ecc50f6fc4cd7d38 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Fri, 5 May 2006 18:32:44 +0000 Subject: Added -M option to display auto-detected modules. git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@70 880c04e9-e011-0410-abf7-b926e227c9cd --- mkinitcpio | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'mkinitcpio') diff --git a/mkinitcpio b/mkinitcpio index afa7b9f..3cdb3f6 100644 --- a/mkinitcpio +++ b/mkinitcpio @@ -25,6 +25,7 @@ SAVELIST="" GENIMG="" APPEND="" QUIET="y" +SHOW_AUTOMODS="n" APPNAME=$(basename "${0}") @@ -38,13 +39,14 @@ usage () echo " -g IMAGE Generate a cpio image as IMAGE. default: no" echo " -a NAME Append to an existing filelist. default: no" echo " -v Verbose output. Default: no" + echo " -M Display modules found via autodetection." echo " -L List all available hooks." echo " -H HOOKNAME Output help for hook 'HOOKNAME'." echo " -h This message." exit 1 } -while getopts 'c:k:s:b:g:a:H:hvL' arg; do +while getopts 'c:k:s:b:g:a:vH:LMh' arg; do case "$arg" in c) CONFIG="$OPTARG" ;; k) KERNELVERSION="$OPTARG" ;; @@ -62,6 +64,7 @@ while getopts 'c:k:s:b:g:a:H:hvL' arg; do echo " $(basename ${h})" done exit 0 ;; + M) SHOW_AUTOMODS="y" ;; h|?) usage ;; *) echo "invalid argument '$arg'"; usage ;; esac @@ -107,6 +110,15 @@ else fi source "${FUNCTIONS}" + +if [ "${SHOW_AUTOMODS}" = "y" ]; then + echo "Modules autodetected:" + for m in $(auto_modules "\.ko"); do + echo " ${m}" + done + exit 0 +fi + echo ":: Begin build" #parse 'global' hook, as defined in ${CONFIG} parse_hook -- cgit v1.2.3-24-g4f1b