dracut.sh: remove temporary cpio output in trap

master
Harald Hoyer 2013-03-20 07:07:55 +01:00
parent 478aa7dac1
commit 02566acdd7
1 changed files with 1 additions and 1 deletions

View File

@ -655,7 +655,7 @@ readonly initdir=$(mktemp --tmpdir="$TMPDIR/" -d -t initramfs.XXXXXX)
}

# clean up after ourselves no matter how we die.
trap 'ret=$?;[[ $keep ]] && echo "Not removing $initdir." >&2 || { [[ $initdir ]] && rm -rf "$initdir";exit $ret; };' EXIT
trap 'ret=$?;[[ $outfile ]] && [[ -f $outfile.$$ ]] && rm -f "$outfile.$$";[[ $keep ]] && echo "Not removing $initdir." >&2 || { [[ $initdir ]] && rm -rf "$initdir";exit $ret; };' EXIT
# clean up after ourselves no matter how we die.
trap 'exit 1;' SIGINT