summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmkinitcpio4
1 files changed, 4 insertions, 0 deletions
diff --git a/mkinitcpio b/mkinitcpio
index bb85f7f..4618baa 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -276,6 +276,10 @@ if [[ ! -f "$CONFIG" ]]; then
fi
. "$CONFIG"
+if [[ -z ${HOOKS//[[:space:]]} && -z ${ADDHOOKS[@]} ]]; then
+ die "Invalid config: No hooks found"
+fi
+
MODULEDIR=$BASEDIR/lib/modules/$KERNELVERSION/
if [[ ! -d $MODULEDIR ]]; then
die "'$MODULEDIR' is not a valid kernel module directory"