View previous topic :: View next topic |
Author |
Message |
ShakeyRo n00b
Joined: 06 Jul 2004 Posts: 13 Location: Romania
|
Posted: Fri Jul 16, 2004 9:55 am Post subject: How can I update gentoo automatically ? |
|
|
I heard something about using cron daemons ?
Thanks |
|
Back to top |
|
|
John5788 Advocate
Joined: 06 Apr 2004 Posts: 2140 Location: 127.0.0.1
|
Posted: Fri Jul 16, 2004 9:58 am Post subject: |
|
|
yeah, vixie-cron is a cron daemon you can install. its not recommended to update gentoo automagically because you need to merge the new config files after something new updates. _________________ John5788 |
|
Back to top |
|
|
gnuageux Veteran
Joined: 17 Apr 2004 Posts: 1201
|
Posted: Fri Jul 16, 2004 10:54 am Post subject: |
|
|
If you have a cron setup to update automagically isnt the general rule of thumb weekly? (so that its not abusive to the gentoo rsync servers.......)
I found this script in a related thread:
#!/bin/sh
#
#
RC=-1
i=0
# Number of attemps to verify connectivity.
ATTEMPTS=30
# Target to ping for connectivity. It is recommended that you change the ping
# target to a host or router owned by your upstream provider.
PING_HOST='www.gentoo.org'
# Uncomment and change to the location of your local ebuilds if you use them.
#PORTDIR_OVERLAY=/usr/local/portage
# To download updates automatically, set FETCH to 1. To disable downloading
# of updates automatically, set FETCH to 0.
FETCH=1
# In the case of a dial-up connection, try to ping a host up to a set number of
# times to bring up the connection. For always-on connections, try to ping a
# host up to a set number of times to verify connectivity.
while [ $RC -ne 0 -a $i -lt $ATTEMPTS ]; do
ping -c 1 $PING_HOST >/dev/null 2>&1
RC=$?
(( i++ ))
done
if [ $RC -eq 0 ]; then
echo Network connection up. Continuing to run
echo emerge sync.
echo =========================================
emerge sync > /dev/null 2>&1
# emerge seems to ignore ebuilds in PORTDIR_OVERLAY that also exist
# in PORTDIR if they do not have a newer modified time.
[ $PORTDIR_OVERLAY ] && find $PORTDIR_OVERLAY -type f -exec touch {} \;
# emerge seems to fail on fast systems if you run it shortly after a
# sync so wait a little bit.
sleep 10
echo Packages that need updated:
emerge -DUp world
if [ $FETCH -ge 1 ]; then
echo -e "Fetching packages that need updated:\n"
emerge -DUf world
fi
else
echo Could not establish a network connection.
echo Cannot run emerge sync or download
echo updates.
echo =========================================
fi _________________ The realOTW: http://forums.realotw.org/index.php
Registered Linux user#364538 |
|
Back to top |
|
|
|