diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-06-09 23:17:49 +0200 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2012-07-15 16:29:08 +0200 |
commit | c4fcc20e9446ed0715681c0d664feb7cb3af2bbb (patch) | |
tree | e8838c6a2e4a0394481fcd7ec39860a5149c7a26 | |
parent | 59ae6346ba32ecbf59dcef2feddb1bd81527465d (diff) | |
download | mkinitcpio-c4fcc20e9446ed0715681c0d664feb7cb3af2bbb.tar.gz mkinitcpio-c4fcc20e9446ed0715681c0d664feb7cb3af2bbb.tar.xz |
use last exit status as default arg for cleanup
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rwxr-xr-x | mkinitcpio | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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() { |