Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How can I update gentoo automatically ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
ShakeyRo
n00b
n00b


Joined: 06 Jul 2004
Posts: 13
Location: Romania

PostPosted: Fri Jul 16, 2004 9:55 am    Post subject: How can I update gentoo automatically ? Reply with quote

I heard something about using cron daemons ?
Thanks
Back to top
View user's profile Send private message
John5788
Advocate
Advocate


Joined: 06 Apr 2004
Posts: 2140
Location: 127.0.0.1

PostPosted: Fri Jul 16, 2004 9:58 am    Post subject: Reply with quote

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
View user's profile Send private message
gnuageux
Veteran
Veteran


Joined: 17 Apr 2004
Posts: 1201

PostPosted: Fri Jul 16, 2004 10:54 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum