summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2010-08-01 19:32:03 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2010-08-01 19:32:03 +0000
commit7a6a97fb4f423a9721adcd14100f2a221d653288 (patch)
tree5097860b5507d8917e6b7e23200bc3e75884f70f /app-emulation
parentStable on amd64 wrt bug #330327 (diff)
downloadgentoo-2-7a6a97fb4f423a9721adcd14100f2a221d653288.tar.gz
gentoo-2-7a6a97fb4f423a9721adcd14100f2a221d653288.tar.bz2
gentoo-2-7a6a97fb4f423a9721adcd14100f2a221d653288.zip
Make the init script pass the KRB5_KTNAME variable to libvirtd so that it actually works as documented for RedHat/Fedora with mit-krb5. Also use more advanced awk commands to avoid greps and possibly misreading based on domain names.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/libvirt/ChangeLog9
-rw-r--r--app-emulation/libvirt/files/libvirtd.init-r112
2 files changed, 17 insertions, 4 deletions
diff --git a/app-emulation/libvirt/ChangeLog b/app-emulation/libvirt/ChangeLog
index a54a960215ec..e43132820366 100644
--- a/app-emulation/libvirt/ChangeLog
+++ b/app-emulation/libvirt/ChangeLog
@@ -1,6 +1,13 @@
# 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.61 2010/07/29 21:31:58 cardoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.62 2010/08/01 19:32:02 flameeyes Exp $
+
+ 01 Aug 2010; Diego E. Pettenò <flameeyes@gentoo.org>
+ files/libvirtd.init-r1:
+ Make the init script pass the KRB5_KTNAME variable to libvirtd so that it
+ actually works as documented for RedHat/Fedora with mit-krb5. Also use
+ more advanced awk commands to avoid greps and possibly misreading based on
+ domain names.
29 Jul 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 e67569417943..8df428f48360 100644
--- a/app-emulation/libvirt/files/libvirtd.init-r1
+++ b/app-emulation/libvirt/files/libvirtd.init-r1
@@ -14,16 +14,22 @@ libvirtd_virsh() {
}
libvirtd_dom_list() {
- libvirtd_virsh list | grep running | awk '{ print $1 }'
+ # Make sure that it wouldn't be confused if the domain name
+ # contains the word running.
+ libvirtd_virsh list | awk '$3 == "running" { print $1 }'
}
libvirtd_dom_count() {
- libvirtd_dom_list | wc -l
+ # 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 }'
}
start() {
ebegin "Starting libvirtd"
- start-stop-daemon --start --quiet --exec /usr/sbin/libvirtd -- -d ${LIBVIRTD_OPTS}
+ start-stop-daemon --start \
+ --env KRB5_KTNAME=/etc/libvirt/krb5.tab \
+ --exec /usr/sbin/libvirtd -- -d ${LIBVIRTD_OPTS}
eend $?
}