From: | "Diego Petteno (flameeyes)" <flameeyes@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in app-emulation/libvirt/files: libvirtd.init-r1 |
Date: | Sun, 01 Aug 2010 20:03:16 |
Message-Id: | 20100801193204.36AB22C3ED@corvid.gentoo.org |
1 | flameeyes 10/08/01 19:32:03 |
2 | |
3 | Modified: libvirtd.init-r1 |
4 | Log: |
5 | 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. |
6 | (Portage version: 2.2_rc67/cvs/Linux x86_64) |
7 | |
8 | Revision Changes Path |
9 | 1.3 app-emulation/libvirt/files/libvirtd.init-r1 |
10 | |
11 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/libvirt/files/libvirtd.init-r1?rev=1.3&view=markup |
12 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/libvirt/files/libvirtd.init-r1?rev=1.3&content-type=text/plain |
13 | diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/libvirt/files/libvirtd.init-r1?r1=1.2&r2=1.3 |
14 | |
15 | Index: libvirtd.init-r1 |
16 | =================================================================== |
17 | RCS file: /var/cvsroot/gentoo-x86/app-emulation/libvirt/files/libvirtd.init-r1,v |
18 | retrieving revision 1.2 |
19 | retrieving revision 1.3 |
20 | diff -u -r1.2 -r1.3 |
21 | --- libvirtd.init-r1 7 Jul 2010 21:59:31 -0000 1.2 |
22 | +++ libvirtd.init-r1 1 Aug 2010 19:32:03 -0000 1.3 |
23 | @@ -14,16 +14,22 @@ |
24 | } |
25 | |
26 | libvirtd_dom_list() { |
27 | - libvirtd_virsh list | grep running | awk '{ print $1 }' |
28 | + # Make sure that it wouldn't be confused if the domain name |
29 | + # contains the word running. |
30 | + libvirtd_virsh list | awk '$3 == "running" { print $1 }' |
31 | } |
32 | |
33 | libvirtd_dom_count() { |
34 | - libvirtd_dom_list | wc -l |
35 | + # Make sure that it wouldn't be confused if the domain name |
36 | + # contains the word running. |
37 | + libvirtd_virsh list | awk '$3 == "running" { count++ } END { print count }' |
38 | } |
39 | |
40 | start() { |
41 | ebegin "Starting libvirtd" |
42 | - start-stop-daemon --start --quiet --exec /usr/sbin/libvirtd -- -d ${LIBVIRTD_OPTS} |
43 | + start-stop-daemon --start \ |
44 | + --env KRB5_KTNAME=/etc/libvirt/krb5.tab \ |
45 | + --exec /usr/sbin/libvirtd -- -d ${LIBVIRTD_OPTS} |
46 | eend $? |
47 | } |