]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut: exit traps with original exitcode
authorHarald Hoyer <harald@redhat.com>
Thu, 8 Oct 2009 12:17:48 +0000 (14:17 +0200)
committerHarald Hoyer <harald@redhat.com>
Thu, 8 Oct 2009 12:21:31 +0000 (14:21 +0200)
dracut

diff --git a/dracut b/dracut
index 3b7792a05ec8d1ce9c93f41bd8188c6ddb8a5112..5c538b8238e0eaf3a171195ac2234f28402c0977 100755 (executable)
--- a/dracut
+++ b/dracut
@@ -167,7 +167,8 @@ fi
 hookdirs="cmdline pre-udev pre-trigger netroot pre-mount pre-pivot mount emergency"
 
 readonly initdir=$(mktemp -d -t initramfs.XXXXXX)
-trap 'rm -rf "$initdir"' 0 # clean up after ourselves no matter how we die.
+trap 'ret=$?;rm -rf "$initdir";exit $ret;' EXIT # clean up after ourselves no matter how we die.
+trap 'exit 1;' SIGINT # clean up after ourselves no matter how we die.
 
 # Need to be able to have non-root users read stuff (rpcbind etc)
 chmod 755 "$initdir"