1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

spec: Start libvirt-guests only if it's on in current runlevel

This commit is contained in:
Jiri Denemark 2011-01-18 09:49:10 +01:00
parent f10d209585
commit b9c1a9cbff

View File

@ -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