From: Jiri Denemark Date: Tue, 18 Jan 2011 08:49:10 +0000 (+0100) Subject: spec: Start libvirt-guests only if it's on in current runlevel X-Git-Tag: v0.8.8~171 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9c1a9cbff87f0f18cd71d307520696ab8da5218;p=thirdparty%2Flibvirt.git spec: Start libvirt-guests only if it's on in current runlevel --- diff --git a/libvirt.spec.in b/libvirt.spec.in index d673cf6639..0a2d10ea0b 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -775,7 +775,8 @@ fi /sbin/ldconfig /sbin/chkconfig --add libvirt-guests if [ $1 -ge 1 ]; then - if /sbin/chkconfig --list libvirt-guests | /bin/grep -q :on ; then + level=$(/sbin/runlevel | /bin/cut -d ' ' -f 2) + if /sbin/chkconfig --list libvirt-guests | /bin/grep -q $level: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