Ik wil omdat ik thuis binnenkort een paar debian systemen ga installeren even een mirrortje opzetten. Ik heb daarvoor het anonftpsync script gepakt en aangepast voor mijn situatie thuis, zoals hieronder.
Maar als ik dan sync krijg ik de volgende fout:
Ik heb al wat proberen te spelen met wel/geen slashes in de server en/of dirnaam, maar dit is het verste dat ik kon komen. Waar kan dit aan liggen?
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
| #! /bin/sh
set -e
# This script originates from http://www.debian.org/mirror/anonftpsync
# Note: You MUST have rsync 2.0.16-1 or newer, which is available in slink
# and all newer Debian releases, or at http://rsync.samba.org/
# Set the variables below to fit your site. You can then use cron to have
# this script run daily to automatically update your copy of the archive.
# Don't forget:
# chmod 744 anonftpsync
# TO is the destination for the base of the Debian mirror directory
# (the dir that holds dists/ and ls-lR).
TO=/home/ftp/debian
# RSYNC_HOST is the site you have chosen from the mirrors file.
# (http://www.debian.org/mirror/list-full)
RSYNC_HOST=rsync://ftp.eu.uu.net/
# RSYNC_DIR is the directory given in the "Packages over rsync:" line of
# the mirrors file for the site you have chosen to mirror.
RSYNC_DIR=debian/
# EXCLUDE is a list of parameters listing patterns that rsync will exclude.
# The following example would exclude mostly everything:
EXCLUDE="\
--exclude binary-alpha/ --exclude binary-arm/ \
--exclude binary-m68k/ --exclude binary-powerpc/ --exclude binary-sparc/ \
--exclude binary-ia64/ --exclude binary-mips*/ --exclude binary-hppa/ \
--exclude binary-sh/ --exclude binary-s390/ \
--exclude binary-hurd-i386/ \
--exclude *_alpha.deb --exclude *_arm.deb \
--exclude *_m68k.deb --exclude *_powerpc.deb --exclude *_sparc.deb \
--exclude *_ia64.deb --exclude *_hppa.deb --exclude *_sh.deb \
--exclude *_mips.deb --exclude *_mipsel.deb --exclude *_s390.deb \
--exclude *_hurd-i386.deb \
--exclude disks-alpha/ --exclude disks-arm/ --exclude disks-i386/ \
--exclude disks-ia64/ --exclude disks-m68k/ --exclude disks-mips*/ \
--exclude disks-powerpc/ --exclude disks-s390/ --exclude disks-sparc/ \
--exclude unstable/ \
--exclude source/ \
--exclude *.orig.tar.gz --exclude *.diff.gz --exclude *.dsc \
"
# With a blank EXCLUDE you will mirror the entire archive.
EXCLUDE=
# There should be no need to edit anything below this point, unless there
# are problems.
#-----------------------------------------------------------------------------#
# Note: on some non-Debian systems, hostname doesn't accept -f option.
# If that's the case on your system, make sure hostname prints the full
# hostname, and remove the -f option. If there's no hostname command,
# explicitly replace `hostname -f` with the hostname.
HOSTNAME=`hostname -f`
LOCK="${TO}/Archive-Update-in-Progress-${HOSTNAME}"
# Get in the right directory and set the umask to be group writable
#
cd $HOME
umask 002
# Check to see if another sync is in progress
if lockfile -! -l 43200 -r 0 "$LOCK"; then
echo ${HOSTNAME} is unable to start rsync, lock file exists
exit 1
fi
# Note: on some non-Debian systems, trap doesn't accept "exit" as signal
# specification. If that's the case on your system, try using "0".
trap "rm -f $LOCK > /dev/null 2>&1" exit
set +e
rsync --recursive --links --hard-links --times --verbose --compress --delete \
--exclude "Archive-Update-in-Progress-${HOSTNAME}" \
--exclude "project/trace/${HOSTNAME}" \
$EXCLUDE \
$RSYNC_HOST::$RSYNC_DIR $TO > rsync.log 2>&1
date -u > "${TO}/project/trace/${HOSTNAME}"
# Note: if you don't have savelog, use any other log rotation facility, or
# comment this out, the log will simply be overwritten each time.
savelog rsync.log > /dev/null 2>&1 |
Maar als ik dan sync krijg ik de volgende fout:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
| Welcome to the UUNET EMEA FTP site This system may be used 24 hours a day, 7 days a week. All transfers are logged with your hostname and email address. If you don't like this policy, disconnect now! Please note that files on this rsync server are _not_ checked for virusses etc. If you experience any problems using this archive, please let us know by sending email ftp-admins_at_eu.uu.net. @ERROR: Unknown module '::debian' rsync: connection unexpectedly closed (448 bytes read so far) rsync error: error in rsync protocol data stream (code 12) at io.c(343) |
Ik heb al wat proberen te spelen met wel/geen slashes in de server en/of dirnaam, maar dit is het verste dat ik kon komen. Waar kan dit aan liggen?
ieeeepppppp :P