From ad7e47072b4993d96749f4e8f0f106b409ed77ca Mon Sep 17 00:00:00 2001 From: Jonatan Schlag Date: Fri, 2 Sep 2016 20:35:23 +0200 Subject: [PATCH] Libvirt: Fix update.sh script The virtlogd could only be restarted when the daemons run. The update.sh script tried to restart the daemon no matter if the daemons run or not. This behaviour produce problems. An If statement now checks if the daemon runs or not and execute the command that is suitable for the situation. Fixes: #11172 Signed-off-by: Jonatan Schlag Signed-off-by: Michael Tremer --- lfs/libvirt | 2 +- src/paks/libvirt/update.sh | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lfs/libvirt b/lfs/libvirt index 6a28b7b1ec..8ebca73fca 100644 --- a/lfs/libvirt +++ b/lfs/libvirt @@ -33,7 +33,7 @@ DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) SUP_ARCH = i586 x86_64 PROG = libvirt -PAK_VER = 10 +PAK_VER = 11 DEPS = "libpciaccess libyajl ncat qemu" diff --git a/src/paks/libvirt/update.sh b/src/paks/libvirt/update.sh index fd0ca9729b..ab57cbf627 100644 --- a/src/paks/libvirt/update.sh +++ b/src/paks/libvirt/update.sh @@ -63,7 +63,13 @@ chown -R nobody:kvm /var/lib/libvirt/images restore_backup ${NAME} #restart virtlogd to use the new version +if [ -f "/var/run/virtlogd.pid" ]; then +# the daemon runs restart him /etc/init.d/virtlogd restart +else +# the daemon runs not start him +/etc/init.d/virtlogd start +fi start_service --background libvirtd -- 2.39.5