From 91b3e1038f32524304063c17e4dd56b9fb66f362 Mon Sep 17 00:00:00 2001 From: Dan Kenigsberg Date: Tue, 7 Dec 2010 18:05:44 +0200 Subject: [PATCH] spec: do not start libvirt-guests if that service is off starting a service during rpm installation is impolite. It is even worse if done during upgrade, for a service that was explicitly turned off. --- libvirt.spec.in | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 74e37b722d..ddb50cde7d 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -744,9 +744,11 @@ fi /sbin/ldconfig /sbin/chkconfig --add libvirt-guests if [ $1 -ge 1 ]; then - # this doesn't do anything but allowing for libvirt-guests to be - # stopped on the first shutdown - /sbin/service libvirt-guests start > /dev/null 2>&1 || true + if /sbin/chkconfig --list libvirt-guests | /bin/grep -q :on ; then + # this doesn't do anything but allowing for libvirt-guests to be + # stopped on the first shutdown + /sbin/service libvirt-guests start > /dev/null 2>&1 || true + fi fi %postun client -p /sbin/ldconfig -- 2.39.5