Hi Folks:

What I'm trying to do is identify unwanted processes, and define a class that will remove their init scripts from the rcx.d directories so they don't get restarted on boot as well as shutting them down at that time.

So the scenario I use for the cf.test included is I start atd. The first processes.pre identifies the process and defines the class that I want acted on in shellcommands.

So anyways with debug=2 I get the following classes showing as defined in shellcommands.

*********************************************************************
 Main Tree Sched: shellcommands pass 1 @ Wed Apr 19 12:38:05 2006
*********************************************************************

(BuildClassEnvironment) ---
ENVIRONMENT: CFALLCLASSES=32_bit:April:Day19:Hr12:Hr12_Q3:Min35_40:Min38:Q3:Wednesday:Yr2006:addr_:any:cfengine_2:cfengine_2_1:cfengine_2_1_20:chartermi_net:compiled_on_linux_gnu:debian:debian_3:debian_3_1:entropy_cfengine_in_low:entropy_cfengine_out_low:entropy_dns_in_low:entropy_dns_out_low:entropy_ftp_in_low:entropy_ftp_out_low:entropy_icmp_in_low:entropy_icmp_out_low:entropy_irc_in_low:entropy_irc_out_low:entropy_misc_in_low:entropy_misc_out_low:entropy_netbiosdgm_in_low:entropy_netbiosdgm_out_low:entropy_netbiosns_in_low:entropy_netbiosns_out_low:entropy_netbiosssn_in_low:entropy_netbiosssn_out_low:entropy_nfsd_in_low:entropy_nfsd_out_low:entropy_smtp_in_low:entropy_smtp_out_low:entropy_ssh_in_low:entropy_tcpack_in_low:entropy_tcpack_out_low:entropy_tcpfin_in_low:entropy_tcpfin_out_low:entropy_tcpsyn_in_low:entropy_tcpsyn_out_low:entropy_udp_in_low:entropy_udp_out_low:entropy_www_in_low:entropy_www_out_low:entropy_wwws_in_low:entropy_wwws_out_low:i686:linux:linux_i686:net:net_iface_eth0:net_iface_lo:opt_debug:sibelius:servicesremove:servicesremove: ---

So the class shows up twice in CFALLCLASSES in the shellcommands section, and yet it is never acted upon.



Brian Seppanen
608.826.1464
#!/var/cfengine/bin/cfagent -d2 -qKivf /var/cfengine/inputs/cf.test
control:
        actionsequence  = ( processes.pre shellcommands processes )


shellcommands:
       servicesremove::
                "/bin/echo 'remove my processes'"
                "/usr/bin/env PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin 
/usr/sbin/update-rc.d -f atd remove"

        debian::
                "/bin/echo 'here I am'"

processes:
        pre.debian::
                "atd" action=warn matches>0 define=servicesremove
                
        debian.!pre::
                "atd" signal=term 

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
http://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to