diff options
author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2014-03-03 11:55:14 -0500 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2014-03-03 11:55:14 -0500 |
commit | 8484b64fa334bfb063b059883f6fe15a53052c8c (patch) | |
tree | aa71571a8cfb9de958842c24e1be7796dca55e0c | |
parent | ce991a62d5f2ce006074ee4b8a97c6029308548c (diff) | |
download | meta-virtualization-8484b64fa334bfb063b059883f6fe15a53052c8c.tar.gz |
libvirt: kill the right dnsmasq daemon
Currently when libvirt daemon is stared, the libvirt startup
script tries to kill the already running dnsmasq daemons
(e.g. from /etc/init.d/dnsmaqs). Also if
"/etc/init.d/libvirtd start" is invoked more than
one time then this will accidentally kills all the dnsmasq
daemon.
This patch makes sure libvirt startup script to kill only the
dnsmasq that spawned by itself. Also try to avoid killing
dnsmasq if "/etc/init.d/libvirtd start" runs second time.
Signed-off-by: Barton Wensley <Barton.Wensley@windriver.com>
Signed-off-by: Vu Tran <vu.tran@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rwxr-xr-x | recipes-extended/libvirt/libvirt/libvirtd.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/recipes-extended/libvirt/libvirt/libvirtd.sh b/recipes-extended/libvirt/libvirt/libvirtd.sh index 8d61c70e..29dbf391 100755 --- a/recipes-extended/libvirt/libvirt/libvirtd.sh +++ b/recipes-extended/libvirt/libvirt/libvirtd.sh | |||
@@ -79,7 +79,9 @@ case "$1" in | |||
79 | fi | 79 | fi |
80 | fi | 80 | fi |
81 | log_begin_msg "Starting virtualization library daemon: libvirtd" | 81 | log_begin_msg "Starting virtualization library daemon: libvirtd" |
82 | start-stop-daemon -K -x /usr/bin/dnsmasq | 82 | if [ ! -e /var/run/libvirtd.pid ]; then |
83 | start-stop-daemon -K -x /usr/bin/dnsmasq --pidfile /var/run/libvirt/network/default.pid | ||
84 | fi | ||
83 | start-stop-daemon --start --quiet --pidfile /var/run/libvirtd.pid --exec /usr/sbin/libvirtd -- --daemon --listen | 85 | start-stop-daemon --start --quiet --pidfile /var/run/libvirtd.pid --exec /usr/sbin/libvirtd -- --daemon --listen |
84 | log_end_msg $? | 86 | log_end_msg $? |
85 | ;; | 87 | ;; |