aboutsummaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'libraries')
-rw-r--r--libraries/libvirt/rc.libvirt3
1 files changed, 1 insertions, 2 deletions
diff --git a/libraries/libvirt/rc.libvirt b/libraries/libvirt/rc.libvirt
index 2141884484a34..6f7a1d198ebda 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`