Managing chkconfig With CFEngine
From Kyle's Wiki
Disabling Services
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
Enabling Services
classes: redhat:: slapd_is_on = ( ReturnsZero(/sbin/chkconfig slapd) ) shellcommands: !slapd_is_on:: "/sbin/chkconfig slapd on" inform=true