> I should probably switch off automatic updates
I've used this script now and again. It's called "disable_yum.sh". Maybe
there's
another version out there - this came from some online CREAM document.
Steve
#!/bin/sh
################################
# Disable yum cron and daemons #
################################
if [ -e /etc/cron.hourly/yum-autoupdate ] || [ -e /etc/cron.hourly/yum ]
|| [ -e /etc/cron.daily/yum.cron ];then
echo "++++++++++++++++++++++++++++++++++++++++++++++++"
echo "Yum cron jobs are now disabled"
rm -f /etc/cron.hourly/yum-autoupdate
rm -f /etc/cron.hourly/yum
rm -f /etc/cron.daily/yum.cron
fi
yum_status=`chkconfig --list |grep yum |grep "3:on"`
service_name=`chkconfig --list |grep yum | cut -f 1`
for serv in $service_name; do
if [ "x$yum_status" != "x" ]; then
echo "++++++++++++++++++++++++++++++++++++++++++++++++"
echo "+ $serv has been switched to off"
chkconfig $serv off
fi
if [ -e /var/lock/subsys/$serv ]; then
/etc/init.d/$serv stop
fi
echo "Done $serv"
done
######################################################
--
Steve Jones [log in to unmask]
System Administrator office: 220
High Energy Physics Division tel (int): 42334
Oliver Lodge Laboratory tel (ext): +44 (0)151 794 2334
University of Liverpool http://www.liv.ac.uk/physics/hep/
|