Maybe this is old news? I have written a quick little script to help prevent a server from syncing its portage tree more than once per 24 hours. Syncing more frequently is more likely to happen on a server with multiple admins, so instead of keeping track of when anyone syncs the tree we now just use this little script. We use esearch instead of calling emerge directly but the script can be adjusted very easily.
If anyone has come up with a better way to do this, I'd love to see it. [EMAIL PROTECTED] ~ # cat /usr/sbin/esync2 #!/bin/bash file=`find /tmp/esync.update -mtime +1` if [ -z $file ]; then echo 'Portage update has already been run within the last 24 hours.' echo 'Please try again later.' else echo 'The local portage tree is more than 24 hours old.' echo '/usr/sbin/esync will now run, this will take at least several minutes to complete' /bin/touch /tmp/esync.update /usr/sbin/esync /bin/touch /tmp/esync.update fi -- [email protected] mailing list
