On Fri, Feb 25, 2011 at 7:00 PM, David Lee <[email protected]> wrote:
> Executive summary: how best can cfengine-3 be used to control various
> "chkconfig XXX {on|off}" things in Redhat/CentOS?
in cfengine2 (I know, I know) we use the ReturnsZero function.
classes:
redhat::
# if this does not return 0 then ..
abrtd_off = ( ReturnsZero(/sbin/chkconfig abrtd) )
# if this returns 0, then ..
avahi_daemon_off = ( ReturnsZero(/sbin/chkconfig avahi-daemon) )
shellcommands:
abrtd_off::
# ... deactivate the abrtd daemon
"/sbin/chkconfig abrtd off" inform=true
"/sbin/service abrtd stop" inform=true
avahi_daemon_off::
# ... deactivate the avahi-daemon
"/sbin/chkconfig avahi-daemon off" inform=true
"/sbin/service avahi-daemon stop" inform=true
I see that it still exists in cfengine3:
http://www.cfengine.org/manuals/cf3-reference.html#Function-returnszero
--
natxo
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine