summaryrefslogtreecommitdiffstats
path: root/bifrost
diff options
context:
space:
mode:
authorYolanda Robla Mota <yroblamo@redhat.com>2016-09-08 11:48:41 +0200
committerTrevor Bramwell <tbramwell@linuxfoundation.org>2017-08-11 12:56:12 -0700
commitd2a20558134090ddbeb236327c82eae0d2d1cba3 (patch)
tree658c97ef3b7980c1bd366c22e5e34b0e6ae24139 /bifrost
parent41f0a4a8a94fe309cf851c6d34d7559f538c1198 (diff)
Fix script when CLEAN_DIB_IMAGES var is not set
It relies on this var being exported, and if the script is ran manually and this var is not set, it crashes. Adding a default to this var to avoid this failure. Change-Id: I5c61a1d9f1aafe2d6c64af70d3237b6c5b0d1e1d Signed-Off-By: Yolanda Robla <yroblamo@redhat.com>
Diffstat (limited to 'bifrost')
-rwxr-xr-xbifrost/scripts/destroy-env.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/bifrost/scripts/destroy-env.sh b/bifrost/scripts/destroy-env.sh
index 4dffee62..f092a658 100755
--- a/bifrost/scripts/destroy-env.sh
+++ b/bifrost/scripts/destroy-env.sh
@@ -27,6 +27,8 @@ echo "removing logs"
rm -rf /var/log/libvirt/baremetal_logs/*.log
# clean up dib images only if requested explicitly
+CLEAN_DIB_IMAGES=${CLEAN_DIB_IMAGES:-false}
+
if [ $CLEAN_DIB_IMAGES = "true" ]; then
rm -rf /httpboot/*
rm -rf /tftpboot/*