1 diff -ur arcavir2010/usr/bin/arcaupdate arcavir2010-update/usr/bin/arcaupdate
2 --- arcavir2010/usr/bin/arcaupdate 2010-08-09 14:20:39.000000000 +0200
3 +++ arcavir2010-update/usr/bin/arcaupdate 2010-08-17 14:14:50.801594212 +0200
8 # ArcaVir 2010 Server update script.
9 # Copyright (C) 2009 ArcaBit sp. z o.o.
12 . /usr/share/arcavir/functions || { echo 'Cannot load /usr/share/arcavir/functions!'; exit 1; }
14 -# if ( set -o noclobber; echo "$$" > ${lockfile} ) 2>/dev/null; then
15 -# trap "${rm} -f ${lockfile}" int term exit
16 +if ( set -o noclobber; echo "$$" > ${lockfile} ) 2>/dev/null; then
17 + trap "${rm} -f ${lockfile}" int term exit
18 ${get} "${repo}" || exit 1
19 - [ -x /etc/init.d/arcad ] && /etc/init.d/arcad stop
20 - ${propagate} "${repo}" "${dst}" || exit 1
21 + cp -rp "${repo}"/bases/* "${dst}"/var/lib/arcavir/bases/
23 - ${bt} "${dst}"var/lib/arcavir/bases/ "${dst}"var/lib/arcavir/bases/abasetr_bt.dat && \
24 - ${chown} arcabit:arcabit "${dst}"var/lib/arcavir/bases/abasetr_bt.dat
25 - [ -x /etc/init.d/arcad ] && /etc/init.d/arcad start
26 -# ${rm} -f ${lockfile}
28 -# die 'Cannot open lockfile'
30 + ${bt} "${dst}"var/lib/arcavir/bases/ "${dst}"var/lib/arcavir/bases/abasetr_bt.dat
31 + chown -R arcabit:arcabit "${dst}"/var/lib/arcavir/bases/
32 + read arcadpid 2>/dev/null </var/run/arcad.pid
33 + [ -n "$arcadpid" ] && kill -HUP $arcadpid
34 + ${rm} -f ${lockfile}
36 + die 'Cannot open lockfile'
40 diff -ur arcavir2010/usr/bin/arcaupdate-get arcavir2010-update/usr/bin/arcaupdate-get
41 --- arcavir2010/usr/bin/arcaupdate-get 2010-08-09 14:20:39.000000000 +0200
42 +++ arcavir2010-update/usr/bin/arcaupdate-get 2010-08-17 14:13:35.729594210 +0200
48 -rawmach=$(${uname} -m)
53 -[ "${rawos}" = 'GNU/Linux' ] && os='linux'
56 -[ "${rawmach}" = 'i386' ] && mach='i386'
57 -[ "${rawmach}" = 'i486' ] && mach='i386'
58 -[ "${rawmach}" = 'i586' ] && mach='i386'
59 -[ "${rawmach}" = 'i686' ] && mach='i386'
60 -[ "${rawmach}" = 'x86_64' ] && mach='amd64'
62 -[ "${os}" = '' ] && die "Unknown system ${rawos}"
63 -[ "${mach}" = '' ] && die "Unknown machine ${rawmach}"
65 -suffix=core/${os}-${mach}
73 ${mkdir} -p ${cache}/bases || die 'mkdir failed'
74 -${rsync} --no-motd -a rsync://${rsyncpath}/${suffix}/ "${cache}" 2> /dev/null
75 -if [ $? -gt 0 ]; then
76 - echo 'arcaupdate-get: warning: rsync failed for core, falling back to http'
77 - ${rm} -rf "${cache}/*" || die 'rm failed'
78 - cd "${cache}" || die 'cd failed'
79 - ${wget} --quiet -N -P "${cache}" -np -nd -r -R 'index.html*' http://${httppath}/${suffix}/ || die 'wget failed'
80 - ${rm} -f "${cache}/robots.txt"
84 -if [ $? -eq 0 ]; then
85 - ${gpg} --no-default-keyring --keyring /var/lib/arcavir/pubring.gpg -q --batch -d < "${cache}/files.gpg" > "${cache}/files.txt" 2>/dev/null
86 - if [ $? -gt 0 ]; then
87 - ${rm} -rf "${cache}/*"
88 - die 'GnuPG verify failed! Someone may be tampering with your repository.'
91 - log_warn 'arcaupdate-get: warning: GnuPG not found. We STRONGLY suggest that you '
92 - log_warn 'arcaupdate-get: warning: install it. Please see the apropriate section '
93 - log_warn 'arcaupdate-get: warning: in README for details.'
98 tmpfile=/tmp/arcaupdate.tmp
100 --- arcavir2010-update/usr/share/arcavir/functions~ 2010-08-09 14:20:39.000000000 +0200
101 +++ arcavir2010-update/usr/share/arcavir/functions 2010-08-18 11:06:41.569925597 +0200
103 # Various other variables
104 repo=/var/cache/arcavir/update
106 -lockfile=/var/run/arcaupdate.lock
107 +lockfile=/var/cache/arcavir/update/arcaupdate.lock
109 rsyncpath=80.72.37.138/ArcaLinux2010
110 httppath=80.72.37.138/update/ArcaLinux2010