Script to disable services

Hi All,

I want to disable bunch of unused services on SLES and RHEL to improve the performance. Since we have more than 100 servers to disable services, I want to do with some script. Any one can give me an idea how to write a script to disable services. Thanks

How about creating a list of the services you want to disable

then just use a loop

for i in `cat /tmp/service-disable`
do
chkconfig --levels 3 5 $i off
done