From a7ed18b173f4250df445399d33c669eb7710d371 Mon Sep 17 00:00:00 2001 From: Richard Cranium Date: Mon, 16 Jun 2014 22:45:12 -0500 Subject: libraries/libvirt: Fix network destruction on shutdown Signed-off-by: Robby Workman --- libraries/libvirt/rc.libvirt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libraries') diff --git a/libraries/libvirt/rc.libvirt b/libraries/libvirt/rc.libvirt index 2141884484..6f7a1d198e 100644 --- a/libraries/libvirt/rc.libvirt +++ b/libraries/libvirt/rc.libvirt @@ -13,7 +13,6 @@ MODULES="tun vhost_net" PIDFILE="/var/run/libvirt/libvirtd.pid" -NETNAME="$(ls -1 /var/lib/libvirt/network | cut -d. -f1)" TIMEOUT=${TIMEOUT:-40} OPTS=${OPTS:-" -v -f /etc/libvirt/libvirtd.conf -p $PIDFILE "} @@ -96,7 +95,7 @@ stop() { check_running_machines check_processor echo "Stopping libvirtd..." - for i in "$NETNAME"; do + for i in $(/usr/sbin/virsh net-list | tail -n +3 | awk '{print $1}'); do /usr/sbin/virsh net-destroy "$i" done kill -TERM `cat $PIDFILE` -- cgit v1.2.3