Created
December 18, 2010 13:15
-
-
Save t9md/746493 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export LANG=C | |
for service in $(/sbin/chkconfig --list | grep 3:on | awk '{ print $1 }') | |
do | |
while : | |
do | |
echo -n "disable $service ?: " | |
read answer | |
case $answer in | |
Y|y) | |
break | |
;; | |
i|I) | |
initscript=/etc/init.d/$service | |
if [ -f $initscript ]; then | |
rpm -qi $(rpm -qf $initscript) | |
fi | |
;; | |
*) | |
;; | |
esac | |
done | |
/sbin/chkconfig $service off | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment