The %post section needs to do a /sbin/chkconfig --add service-name, otherwise you get a lot of this in the logs after installing Salt, when you apply a service.running state for the master, minion, syndic, etc.:
[ERROR ] Command '[u'/sbin/chkconfig', u'--list', u'salt-master']' failed with return code: 1
[ERROR ] stderr: service salt-master supports chkconfig, but is not referenced in any runlevel (run 'chkconfig --add salt-master')
Similarly, the %preun should be removing the service from chkconfig when the uninstall is not due to an upgrade, but it is not:
if [ $1 -eq 0 ] ; then
/sbin/service service_name stop >/dev/null 2>&1
/sbin/chkconfig --del service_name
fi
The
%post
section needs to do a/sbin/chkconfig --add service-name
, otherwise you get a lot of this in the logs after installing Salt, when you apply aservice.running
state for the master, minion, syndic, etc.:Similarly, the
%preun
should be removing the service from chkconfig when the uninstall is not due to an upgrade, but it is not: