[arch-projects] [mkinitcpio][PATCH 2/4] use last exit status as default arg for cleanup
Dave Reisner
dreisner at archlinux.org
Sun Jul 15 10:33:50 EDT 2012
Signed-off-by: Dave Reisner <dreisner at archlinux.org>
---
mkinitcpio | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/mkinitcpio b/mkinitcpio
index 43a89df..0834dc0 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -55,6 +55,8 @@ EOF
}
cleanup() {
+ local err=${1:-$?}
+
if [[ $workdir ]]; then
# when PRESET is set, we're in the main loop, not a worker process
if (( SAVELIST )) && [[ -z $PRESET ]]; then
@@ -64,7 +66,7 @@ cleanup() {
fi
fi
- exit ${1:0}
+ exit $err
}
resolve_kernver() {
--
1.7.11.2
More information about the arch-projects
mailing list