prepare-root.sh: remove final output directory in case of an error
This commit is contained in:
parent
c99ed80802
commit
bb9a8d2581
|
@ -170,6 +170,7 @@ trap '
|
||||||
[[ -d "$i" ]] && mountpoint -q "$i" && umount "$i"
|
[[ -d "$i" ]] && mountpoint -q "$i" && umount "$i"
|
||||||
done
|
done
|
||||||
[[ $MY_TMPDIR ]] && rm -rf --one-file-system -- "$MY_TMPDIR"
|
[[ $MY_TMPDIR ]] && rm -rf --one-file-system -- "$MY_TMPDIR"
|
||||||
|
(( $ret != 0 )) && [[ "$OUTDIR" ]] && rm -rf --one-file-system -- "$OUTDIR"
|
||||||
setenforce $OLD_SELINUX
|
setenforce $OLD_SELINUX
|
||||||
exit $ret;
|
exit $ret;
|
||||||
' EXIT
|
' EXIT
|
||||||
|
|
Loading…
Reference in a new issue