Annotation of embedaddon/strongswan/testing/stop-testing, revision 1.1
1.1 ! misho 1: #!/bin/bash
! 2:
! 3: DIR=$(dirname `readlink -f $0`)
! 4: . $DIR/testing.conf
! 5: . $DIR/scripts/function.sh
! 6:
! 7: echo "Stopping test environment"
! 8:
! 9: NETWORKS="vnet1 vnet2 vnet3"
! 10: KNLTARGET=/var/run/kvm-swan-kernel
! 11: HOSTFSTARGET=/var/run/kvm-swan-hostfs
! 12: TESTRESULTSTARGET=/var/run/kvm-swan-testresults
! 13:
! 14: [ `id -u` -eq 0 ] || die "You must be root to run $0"
! 15:
! 16: check_commands virsh
! 17:
! 18: for net in $NETWORKS
! 19: do
! 20: log_action "Network $net"
! 21: execute "virsh net-destroy $net"
! 22: done
! 23:
! 24: for host in $STRONGSWANHOSTS
! 25: do
! 26: log_action "Guest $host"
! 27: execute "virsh shutdown $host"
! 28: rm -f $VIRTIMGSTORE/$host.$IMGEXT
! 29: done
! 30:
! 31: log_action "Removing kernel $KERNEL"
! 32: execute "rm $KNLTARGET"
! 33:
! 34: log_action "Removing link to hostfs"
! 35: execute "rm $HOSTFSTARGET"
! 36:
! 37: log_action "Removing link to testresults"
! 38: execute "rm $TESTRESULTSTARGET"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>