summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Goldstein <cardoe@gentoo.org>2010-08-05 19:33:14 +0000
committerDoug Goldstein <cardoe@gentoo.org>2010-08-05 19:33:14 +0000
commit2e37096575929443e0920dd8de78dbae494e65f7 (patch)
tree100a5f107d51570f194fd0260f1c558d4c7db5d0 /app-emulation
parentRemove masking of media-sound/squeezecenter (removed from tree, bug #287257) (diff)
downloadgentoo-2-2e37096575929443e0920dd8de78dbae494e65f7.tar.gz
gentoo-2-2e37096575929443e0920dd8de78dbae494e65f7.tar.bz2
gentoo-2-2e37096575929443e0920dd8de78dbae494e65f7.zip
Fix issue with init script when no virtual machines are running
(Portage version: 2.1.8.3/cvs/Linux x86_64)
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/libvirt/ChangeLog5
-rw-r--r--app-emulation/libvirt/files/libvirtd.init-r14
2 files changed, 7 insertions, 2 deletions
diff --git a/app-emulation/libvirt/ChangeLog b/app-emulation/libvirt/ChangeLog
index b5f2aba09383..5023d8671910 100644
--- a/app-emulation/libvirt/ChangeLog
+++ b/app-emulation/libvirt/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for app-emulation/libvirt
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.63 2010/08/05 15:53:01 cardoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.64 2010/08/05 19:33:14 cardoe Exp $
+
+ 05 Aug 2010; Doug Goldstein <cardoe@gentoo.org> files/libvirtd.init-r1:
+ Fix issue with init script when no virtual machines are running
05 Aug 2010; Doug Goldstein <cardoe@gentoo.org> -libvirt-0.8.1-r1.ebuild,
libvirt-0.8.2-r1.ebuild:
diff --git a/app-emulation/libvirt/files/libvirtd.init-r1 b/app-emulation/libvirt/files/libvirtd.init-r1
index 8df428f48360..22d8a03b7b42 100644
--- a/app-emulation/libvirt/files/libvirtd.init-r1
+++ b/app-emulation/libvirt/files/libvirtd.init-r1
@@ -22,7 +22,9 @@ libvirtd_dom_list() {
libvirtd_dom_count() {
# Make sure that it wouldn't be confused if the domain name
# contains the word running.
- libvirtd_virsh list | awk '$3 == "running" { count++ } END { print count }'
+ libvirtd_virsh list | awk 'BEGIN { count = 0 } \
+ $3 == "running" { count++ } \
+ END { print count }'
}
start() {