summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mkinitcpio8
1 files changed, 7 insertions, 1 deletions
diff --git a/mkinitcpio b/mkinitcpio
index 8631eee..afa7b9f 100644
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -38,12 +38,13 @@ 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 " -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:hv' arg; do
+while getopts 'c:k:s:b:g:a:H:hvL' arg; do
case "$arg" in
c) CONFIG="$OPTARG" ;;
k) KERNELVERSION="$OPTARG" ;;
@@ -56,6 +57,11 @@ while getopts 'c:k:s:b:g:a:H:hv' arg; do
echo "Help for hook '${OPTARG}':"
help
exit 0 ;;
+ L) echo "Available hooks: "
+ for h in ${INSTDIR}/*; do
+ echo " $(basename ${h})"
+ done
+ exit 0 ;;
h|?) usage ;;
*) echo "invalid argument '$arg'"; usage ;;
esac