Home » GeekSpeak » Coding Music

Coding Music

I’m upgrading some Linux systems today. I write some automation scripts for this stuff. Anyway, psychedelic trance mixes are perfect for this.

 

 


 

 

 
QUICKY SCRIPT:

#!/bin/sh
############################################
# BiffSocko
# LinuxUpgrade.sh
#
# perform linux upgrade using our own
# repo and the group security repo
############################################
LOGFILE=”/tmp/upgrade.log”

#############################################
# function chkerr_exit()
#############################################
chkerr_exit(){
$@ 2> /dev/null

if [ $? -ne 0 ]
then
logger “$PGM: failed executing $@”
echo “`date` $0: failed executing $@” >> $LOGFILE
exit $STATE_ERR
fi
} # END chkerr_exit()

#############################################
# main()
#############################################
if [ $UID -ne 0 ]
then
echo “you must be root to run this program”
exit 1
fi

chkerr_exit “cd /etc/yum.repos.d”

#############################################
# move old configuration files to a backup dir
#############################################
chkerr_exit “mkdir -p /etc/yum.repos.d/backup”
LIST=`ls | grep -v backup`
for next in $LIST
do
chkerr_exit “mv $next /etc/yum.repos.d/backup/”
done

#############################################
# Download the new Bacardi repo
#############################################
chkerr_exit “wget http://lrdne0tg/downloads/repo/TeamWayne6_6.repo”

#############################################
# clean out the yum cache
#############################################
chkerr_exit “yum clean all”
# this package screws me up EVERY.SINGLE.TIME.
chkerr_exit “yum -y erase hponcfg”

#############################################
# update the OS
#############################################
chkerr_exit “yum -y upgrade –enablerepo=Additions –skip-broken”
chkerr_exit “yum -y install hponcfg”

echo””
echo “now running:”
cat /etc/redhat-release

#############################################
# update GPFS Kernel Module
#############################################
URL=”http://lrdne0tg/downloads/GPFS_current”
rpm -ivh $URL/gpfs.gplbin-2.6.32-504.16.2.el6.x86_64-3.5.0-10.x86_64.rpm –force
exit 0

Leave a Reply