summaryrefslogtreecommitdiffstats
path: root/bin/lvc.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/lvc.sh')
-rwxr-xr-xbin/lvc.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/lvc.sh b/bin/lvc.sh
index 5f7bebae..8f0a3d6f 100755
--- a/bin/lvc.sh
+++ b/bin/lvc.sh
@@ -68,7 +68,12 @@ mkdir -p $RESULTS
mkdir -p $WORKSPACE/DebianToasterStorage
-discard_snapshots $LIBVIRT_DOMAIN_NAME /srv/jenkins/cucumber /srv/jenkins/bin/lvc.sh /srv/jenkins/job-cfg/lvc.yaml $NETBOOT
+for dep in /srv/jenkins/cucumber /srv/jenkins/bin/lvc.sh /srv/jenkins/job-cfg/lvc.yaml $NETBOOT ; do
+ if [ -e "$dep" ] ; then
+ LV_SNAP_DEPENDS="$LV_SNAP_DEPENDS $dep"
+ fi
+done
+discard_snapshots $LIBVIRT_DOMAIN_NAME $LV_SNAP_DEPENDS
trap cleanup_all INT TERM EXIT