summaryrefslogtreecommitdiffstats
path: root/mkinitcpio
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2008-03-15 21:44:47 +0100
committerThomas Bächler <thomas@archlinux.org>2008-03-15 21:44:47 +0100
commitee858697632359dcf4577132a38d1ce107e84ae3 (patch)
tree3b8fc49d55c1a4fd6d208d807692d349634bda74 /mkinitcpio
parent14aec191cdfecdaa243f36d24c8e7fa5d990325d (diff)
downloadmkinitcpio-ee858697632359dcf4577132a38d1ce107e84ae3.tar.gz
mkinitcpio-ee858697632359dcf4577132a38d1ce107e84ae3.tar.xz
Add -S option to skip hooks when building the image
Diffstat (limited to 'mkinitcpio')
-rw-r--r--mkinitcpio20
1 files changed, 12 insertions, 8 deletions
diff --git a/mkinitcpio b/mkinitcpio
index c53e57e..987a882 100644
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -28,6 +28,7 @@ GENIMG=""
APPEND=""
PRESET=""
MESSAGE=""
+SKIPHOOKS=""
PRESETDIR="mkinitcpio.d"
QUIET="y"
SHOW_AUTOMODS="n"
@@ -49,6 +50,7 @@ usage ()
echo " -a NAME Append to an existing filelist. default: no"
echo " -p PRESET Build specified preset."
echo " -m MESSAGE Print MESSAGE before passing control to kinit."
+ echo " -S SKIPHOOKS Skip SKIPHOOKS (comma-separated) when building the image."
echo " -v Verbose output. Default: no"
echo " -M Display modules found via autodetection."
echo " -L List all available hooks."
@@ -57,7 +59,7 @@ usage ()
exit 1
}
-while getopts ':c:k:s:b:g:a:p:m:vH:LMh' arg; do
+while getopts ':c:k:s:b:g:a:p:m:vH:LMhS:' arg; do
if [ "${OPTARG:0:1}" = "-" ]; then
echo "error: optional argument to '-$arg' begins with a '-'"
echo " you probably don't want this....aborting."
@@ -73,15 +75,16 @@ while getopts ':c:k:s:b:g:a:p:m:vH:LMh' arg; do
p) PRESET="$OPTARG" ;;
m) MESSAGE="$OPTARG" ;;
v) QUIET="n" ;;
+ S) SKIPHOOKS="${OPTARG}" ;;
H) source "${INSTDIR}/${OPTARG}";
- echo "Help for hook '${OPTARG}':"
- help
- exit 0 ;;
+ echo "Help for hook '${OPTARG}':"
+ help
+ exit 0 ;;
L) echo "Available hooks: "
- for h in ${INSTDIR}/*; do
- echo " $(basename ${h})"
- done
- exit 0 ;;
+ for h in ${INSTDIR}/*; do
+ echo " $(basename ${h})"
+ done
+ exit 0 ;;
M) SHOW_AUTOMODS="y" ;;
h|?) usage ;;
:) echo "${OPTARG} requires a value..."; usage ;;
@@ -192,6 +195,7 @@ echo ":: Begin build"
parse_hook
for hook in $HOOKS; do
+ echo "${SKIPHOOKS}" | grep -qw ${hook} && continue
unset MODULES
unset BINARIES
unset FILES