saravanan ganapathy wrote:
>   cvsup -g -L 2 /root/ports-supfile

Once you get your cvsup stuff straightened out, try this script, which I run every other day. Change the Log file if you want. This updates my sources to stable and updates the ports tree. I use two different cvsup files and commands so the two don't get confused. Don't try to use the same config file and cvsup command for the two different types of updates!! (In my experience, you're asking for trouble.)

You will need to install a few ports first, but you should get the idea. If you read the output every day (or you could email it to yourself, which I may eventually do if I like it), you will see which ports need to be updated. This script will probably contiune to get better as it gets added to. Like I need to include the security audited version of ports that need updated!


BEGIN CODE... mydaily.sh #!/bin/sh # # Billy borrowed stuff on 12/18/2004 from: #http://www.oreillynet.com/pub/wlg/6041?page=last&x-order=date # LOGF="/var/log/cvsup.log" echo "START @ `/bin/date`" >>$LOGF #/bin/date >>$LOGF #use fastest_cvsup to find fastest geographically #close mirror; I'll check Canada and the US

if SERVER=`/usr/local/bin/fastest_cvsup -Q -c ca,us`; then
echo "Using STABLE Server:" $SERVER >>$LOGF
/usr/local/bin/cvsup -L1 -h $SERVER -l /var/log/cvs-lock-s /root/stable-supfile >>$LOGF
echo "STABLE done @ `/bin/date`" >>$LOGF
else
echo "cvsup-STABLE has a fastest_cvsup problem on...`/bin/date`" >>$LOGF
fi


if SERVER=`/usr/local/bin/fastest_cvsup -Q -c ca,us`; then
echo "Using PORTS Server:" $SERVER >>$LOGF
/usr/local/bin/cvsup -L0 -h $SERVER -l /var/log/cvs-lock-p /root/ports-supfile >>$LOGF
echo "PORTS done @ `/bin/date`" >>$LOGF
else
echo "cvsup-PORTS has a fastest_cvsup problem on...`/bin/date`" >>$LOGF
fi


#-U (which takes a long time to execute) isn't needed
#with the fetchindex command
cd /usr/ports
make fetchindex >>$LOGF
/usr/local/sbin/portsdb -u >>$LOGF
# command1 2>&1 | command2

# echo "Looking for security patches"
# freebsd-update fetch
# This program not working for me.  unComment above line if it works for U.

echo "The following ports need upgrading" >>$LOGF
/usr/local/sbin/portversion -l "<" >>$LOGF
echo "" >>$LOGF
echo "STOP at `/bin/date`." >>$LOGF
echo "********" >>$LOGF

END CODE... mydaily.sh

--
Billy
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to