From: <sar...@us...> - 2008-06-27 11:22:08
|
Update of /cvsroot/ceps/ceps-sysfiles/cron In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv14203/cron Modified Files: cvsBackup.sh Log Message: Modified the cvsBackup script to run based on the service group instead of hardcoded value. Service Group: cvs-bkp Index: cvsBackup.sh =================================================================== RCS file: /cvsroot/ceps/ceps-sysfiles/cron/cvsBackup.sh,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** cvsBackup.sh 24 Feb 2008 20:35:52 -0000 1.2 --- cvsBackup.sh 27 Jun 2008 11:21:54 -0000 1.3 *************** *** 3,14 **** # Run cvsBackup if we are on the CVS Backup server - . /usr/ceps/etc/config - - CVSBACKUP=`echo $CVSBACKUP_SERVER | sed -e 's/\..*//'` MYNAME=`hostname | sed -e 's/\..*//'` ! ! if [ "$MYNAME" = "$CVSBACKUP" ] then ! exec /usr/ceps/bin/cvsBackup fi --- 3,15 ---- # Run cvsBackup if we are on the CVS Backup server MYNAME=`hostname | sed -e 's/\..*//'` ! CVSBACKUP=`nslookup cvs-bkp | grep -wm1 Name | awk '{print $2}' | sed -e 's/\..*//g'` ! packcount=`ping -n -c4 cvs-bkp | grep 'bytes from' | wc -l 2>/dev/null` ! if [ "$packcount" -gt 1 ] then ! if [ "$MYNAME" = "$CVSBACKUP" ] ! then ! exec /usr/ceps/bin/cvsBackup ! fi fi |