[arch-projects] [mkinitcpio][PATCH 14/26] mkinitcpio: keep going even when a hook isn't found

Dave Reisner d at falconindy.com
Mon Sep 26 21:22:15 EDT 2011

Instead of bailing entirely, throw an error, and ensure that we exit
with a non-zero status. The user might do something as simple as
misspell a hook name which may or may not prevent a useful image from
being created.

Signed-off-by: Dave Reisner <dreisner at archlinux.org>
 mkinitcpio |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/mkinitcpio b/mkinitcpio
index 0116722..72e7ec8 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -312,7 +312,8 @@ for hook in ${HOOKS}; do
-        die "Hook '$hook' can not be found."
+        error "Hook '$hook' can not be found."
+        (( ++builderrors ))

More information about the arch-projects mailing list