diff options
author | Richard Cranium <anon@anon> | 2014-06-16 22:45:12 -0500 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2014-06-18 16:19:16 -0500 |
commit | a7ed18b173f4250df445399d33c669eb7710d371 (patch) | |
tree | 8d44071954298f03fba59f8c2dde8e0ce521bb49 /libraries | |
parent | 64a2298bdeb59239e5f29b4e6fa4dcddbe9a9f68 (diff) |
libraries/libvirt: Fix network destruction on shutdown
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/libvirt/rc.libvirt | 3 |
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` |