Fixed service handling in specfile

After adding the libvirt-guests service into usual runlevels, we used
to start the libvirt-guests service. However this is usually not a
good practice. As mentioned on fedoraproject wiki, the installations
can be in changeroots, in an installer context, or in other situations
where we don't want the services autostarted.
This commit is contained in:
Martin Kletzander 2012-02-24 12:28:58 +01:00 committed by Eric Blake
parent 4a92360091
commit 801a60ff88
1 changed files with 0 additions and 8 deletions

View File

@ -1027,14 +1027,6 @@ fi
%if %{with_systemd} %if %{with_systemd}
%else %else
/sbin/chkconfig --add libvirt-guests /sbin/chkconfig --add libvirt-guests
if [ $1 -ge 1 ]; then
level=$(/sbin/runlevel | /bin/cut -d ' ' -f 2)
if /sbin/chkconfig --levels $level libvirt-guests; 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
%endif %endif
%postun client -p /sbin/ldconfig %postun client -p /sbin/ldconfig