prepare-root.sh: remove final output directory in case of an error

This commit is contained in:
Harald Hoyer 2018-10-23 14:15:16 +02:00
parent c99ed80802
commit bb9a8d2581

View file

@ -170,6 +170,7 @@ trap '
[[ -d "$i" ]] && mountpoint -q "$i" && umount "$i"
done
[[ $MY_TMPDIR ]] && rm -rf --one-file-system -- "$MY_TMPDIR"
(( $ret != 0 )) && [[ "$OUTDIR" ]] && rm -rf --one-file-system -- "$OUTDIR"
setenforce $OLD_SELINUX
exit $ret;
' EXIT