Moderator: ago
Questa soluzione è interessante perchè permette di usare il portage dei pc anche quando sono disconnessi dalla rete (molto utile per portatili).xchris wrote:eventualmente potresti fare un rsync server su quello principale![]()
Code: Select all
emerge gentoo-rsync-mirror
Code: Select all
bash-2.05b# cat /etc/rsync/rsyncd.conf
#uid = nobody
#gid = nobody
use chroot = no
max connections = 20
pid file = /var/run/rsyncd.pid
motd file = /etc/rsync/rsyncd.motd
transfer logging = yes
log format = %t %a %m %f %b
syslog facility = local3
timeout = 300
[gentoo-x86-portage]
#this entry is for compatibility
path = /usr/portage
comment = Gentoo Linux Portage tree
[gentoo-portage]
#modern versions of portage use this entry
path = /usr/portage
comment = Gentoo Linux Portage tree mirror
exclude = distfiles
Code: Select all
#!/bin/bash
RSYNC="/usr/bin/rsync"
OPTS="--quiet --recursive --links --perms --times --devices --compress --delete --timeout=600"
#Uncomment the following line only if you have been granted access to rsync1.us.gentoo.org
#SRC="rsync://rsync1.us.gentoo.org/gentoo-portage"
#If you are waiting for access to our master mirror, select one of our mirrors to mirror from:
SRC="rsync://rsync.gentoo.org/gentoo-portage"
DST="/usr/portage/"
echo "Started update at" `date` >> /var/log/`basename $0`.log 2>&1
logger -t rsync "re-rsyncing the gentoo-portage tree"
${RSYNC} ${OPTS} ${SRC} ${DST} >> /var/log/`basename $0`.log 2>&1
echo "End: "`date` >> /var/log/`basename $0`.log 2>&1
Code: Select all
rc-update add rsyncd default
Code: Select all
/etc/init.d/rsyncd start
Code: Select all
crontab -e
Code: Select all
00 00 * * * /opt/gentoo-rsync/rsync-gentoo-portage.sh
Code: Select all
SYNC="rsync://192.168.0.250/gentoo-portage"
