dracut: exit traps with original exitcode

master
Harald Hoyer 2009-10-08 14:17:48 +02:00
parent 8aa36728f5
commit 5af0cf0ce6
1 changed files with 2 additions and 1 deletions

3
dracut
View File

@ -167,7 +167,8 @@ fi
hookdirs="cmdline pre-udev pre-trigger netroot pre-mount pre-pivot mount emergency" hookdirs="cmdline pre-udev pre-trigger netroot pre-mount pre-pivot mount emergency"


readonly initdir=$(mktemp -d -t initramfs.XXXXXX) 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) # Need to be able to have non-root users read stuff (rpcbind etc)
chmod 755 "$initdir" chmod 755 "$initdir"