]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Libvirt: Fix update.sh script
authorJonatan Schlag <jonatan.schlag@ipfire.org>
Fri, 2 Sep 2016 18:35:23 +0000 (20:35 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 5 Sep 2016 16:05:32 +0000 (17:05 +0100)
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 <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/libvirt
src/paks/libvirt/update.sh

index 6a28b7b1ec41b6eed14be99128ef2473b12ede3b..8ebca73fcaf697bd616e0afc5cf3ae9acf928c8c 100644 (file)
@@ -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"
 
index fd0ca9729b6893d769cfecaf055de6b0750848b4..ab57cbf627a473e507ee356920bab1f1d26766e0 100644 (file)
@@ -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