summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-05-05 20:32:44 +0200
committerAaron Griffin <aaron@archlinux.org>2006-05-05 20:32:44 +0200
commit7737a58e7efb858e3cd89ee3ecc50f6fc4cd7d38 (patch)
treef4ff4243def73a6bc573abf7e980402c2204df04
parent4fc2b402adbbe6bd1c936e509ad6736e92168396 (diff)
downloadmkinitcpio-7737a58e7efb858e3cd89ee3ecc50f6fc4cd7d38.tar.gz
mkinitcpio-7737a58e7efb858e3cd89ee3ecc50f6fc4cd7d38.tar.xz
Added -M option to display auto-detected modules.
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@70 880c04e9-e011-0410-abf7-b926e227c9cd
-rw-r--r--mkinitcpio14
1 files changed, 13 insertions, 1 deletions
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