summaryrefslogtreecommitdiff
path: root/dracut.sh
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2013-03-20 07:07:55 +0100
committerHarald Hoyer <harald@redhat.com>2013-03-20 07:08:29 +0100
commit02566acdd7a3e371d413c30d7267fde2fb01c9cf (patch)
treee213f5e18d4577006050196b5a38472394141674 /dracut.sh
parent478aa7dac12fbbb01161a9bc78b70b8f7746fef9 (diff)
downloaddracut-02566acdd7a3e371d413c30d7267fde2fb01c9cf.tar.gz
dracut-02566acdd7a3e371d413c30d7267fde2fb01c9cf.tar.bz2
dracut-02566acdd7a3e371d413c30d7267fde2fb01c9cf.zip
dracut.sh: remove temporary cpio output in trap
Diffstat (limited to 'dracut.sh')
-rwxr-xr-xdracut.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/dracut.sh b/dracut.sh
index 69f52824..77287127 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -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