Merge lp:~nafallo/ubumirror/script-deprecation into lp:ubumirror

Proposed by Nafallo Bjälevik
Status: Merged
Merged at revision: 45
Proposed branch: lp:~nafallo/ubumirror/script-deprecation
Merge into: lp:ubumirror
Diff against target: 157 lines (+6/-87)
5 files modified
README (+0/-1)
ubucdimage (+2/-2)
ubudvd (+0/-69)
ubumirror.conf (+2/-11)
ubumirror.crontab (+2/-4)
To merge this branch: bzr merge lp:~nafallo/ubumirror/script-deprecation
Reviewer Review Type Date Requested Status
Jonathan Davies (community) code Approve
Review via email: mp+17944@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Nafallo Bjälevik (nafallo) wrote :

Deprecated ubudvd + fixed some wording and crontime for ubucdimage.

Revision history for this message
Jonathan Davies (jpds) wrote :

[r=jpds]

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README'
2--- README 2010-01-20 15:21:38 +0000
3+++ README 2010-01-23 16:17:12 +0000
4@@ -37,7 +37,6 @@
5
6 + ubuarchive: sync packages from an Ubuntu archive mirror.
7 + ubucdimage: sync CD images from an Ubuntu cdimage mirror (cdimage.ubuntu.com).
8- + ubudvd: sync DVD images fomr an Ubuntu cdimage mirror.
9 + ubuports: sync packages from an Ubuntu ports mirror (ports.ubuntu.com).
10 + uburelease: sync CD images from an Ubuntu releases mirror.
11
12
13=== modified file 'ubucdimage'
14--- ubucdimage 2009-11-02 12:54:23 +0000
15+++ ubucdimage 2010-01-23 16:17:12 +0000
16@@ -1,7 +1,7 @@
17 #!/bin/sh
18 #
19-# ubucdimage - provides an easy way to sync ISO files from an Ubuntu CD
20-# image mirror.
21+# ubucdimage - provides an easy way to sync daily ISO files from an
22+# Ubuntu CD image mirror.
23 #
24 # Copyright (C) 2006 - 2009 Nafallo Bjälevik
25 #
26
27=== removed file 'ubudvd'
28--- ubudvd 2009-11-02 12:54:23 +0000
29+++ ubudvd 1970-01-01 00:00:00 +0000
30@@ -1,69 +0,0 @@
31-#!/bin/sh
32-#
33-# ubudvd - provides an easy way to sync DVD images from an Ubuntu DVD
34-# mirror.
35-#
36-# Copyright (C) 2006 - 2009 Nafallo Bjälevik
37-#
38-# This program is free software: you can redistribute it and/or modify
39-# it under the terms of the GNU General Public License as published by
40-# the Free Software Foundation, either version 3 of the License, or
41-# (at your option) any later version.
42-#
43-# This program is distributed in the hope that it will be useful,
44-# but WITHOUT ANY WARRANTY; without even the implied warranty of
45-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
46-# GNU General Public License for more details.
47-#
48-# You should have received a copy of the GNU General Public License
49-# along with this program. If not, see <http://www.gnu.org/licenses/>.
50-#
51-
52-set -e
53-
54-if [ ! -f /etc/ubumirror.conf ]; then
55- echo "File /etc/ubumirror.conf does not exist!"
56- exit
57-fi
58-
59-. /etc/ubumirror.conf
60-
61-LOCK="${UBUDVD_DIR}/Archive-Update-in-Progress-${HOSTNAME}"
62-
63-# Get in the right directory and set the umask to be group writable
64-cd $HOME
65-umask 022
66-
67-# Check to see if another sync is in progress
68-if ! ( set -o noclobber; echo "$$" > "${LOCK}") 2> /dev/null; then
69- if ! $(kill -0 $(cat ${LOCK}) 2>/dev/null); then
70- # Process does either not exist or is not owned by us.
71- echo "$$" > "${LOCK}"
72- else
73- echo "Unable to start rsync, lock file still exists, PID $(cat ${LOCK})."
74- exit 1
75- fi
76-fi
77-
78-trap 'rm -f $LOCK > /dev/null 2>&1; echo "Done at $(date)" >> $LOGDIR/ubudvd.log; savelog -c 28 -n $LOGDIR/ubudvd.log > /dev/null' EXIT
79-
80-echo "Starting at $(date)" >> $LOGDIR/ubudvd.log
81-
82-set +e
83-echo "Syncing ISOs..." >> $LOGDIR/ubudvd.log
84-rsync -av --partial --timeout=600 \
85- --bwlimit=$SPEED \
86- $UBUDVD_EXCLUDE \
87- $UBUDVD_MIRROR $UBUDVD_DIR >> $LOGDIR/ubudvd.log 2>&1
88-
89-if [ $? -ne 0 ]; then
90- ( echo "Eeek. Ubuntu iso rsync broke down... Check logs.."; \
91- egrep '^write failed|@ERROR' $LOGDIR/ubudvd.log ) | mail -s "Ubuntu dvd sync failed" $EMAIL
92- echo "Eeek. Ubuntu iso rsync broke down..." >> $LOGDIR/ubudvd.log
93- exit 2
94-fi
95-
96-echo "Done at $(date)" >> $LOGDIR/ubudvd.log
97-
98-rm -f $LOCK > /dev/null 2>&1
99-date -u > "${UBUDVD_DIR}/.trace/${HOSTNAME}"
100
101=== modified file 'ubumirror.conf'
102--- ubumirror.conf 2009-11-01 21:15:55 +0000
103+++ ubumirror.conf 2010-01-23 16:17:12 +0000
104@@ -24,10 +24,6 @@
105 # The script won't run if this variable isn't set
106 #UBUREL_DIR="/srv/mirror/ubuntu-releases"
107
108-# UBUDVD_DIR is the destination for the base of the dvd directory
109-# The script won't run if this variable isn't set
110-#UBUDVD_DIR="/srv/mirror/ubuntu-dvd"
111-
112 # UBUPOR_DIR is the destination for the base of the ports directory
113 # The script (ubuports) won't run if this variable isn't set
114 #UBUPOR_DIR="/srv/mirror/ubuntu-ports"
115@@ -35,15 +31,14 @@
116 # LOGDIR is the destination directory of all the logs
117 LOGDIR="/var/log/ubumirror/"
118
119-# UBU{ARC,CDI,REL,DVD}_MIRROR is the rsync path in the form of host::directory/ of the
120+# UBU{ARC,CDI,REL}_MIRROR is the rsync path in the form of host::directory/ of the
121 # upstream mirrors where the ubumirror scripts will mirror from.
122 UBUARC_MIRROR=archive.ubuntu.com::ubuntu/
123 UBUCDI_MIRROR=cdimage.ubuntu.com::cdimage/
124 UBUREL_MIRROR=rsync.releases.ubuntu.com::releases/
125-UBUDVD_MIRROR=cdimage.ubuntu.com::cdimage/dvd/
126 UBUPOR_MIRROR=ports.ubuntu.com::ubuntu-ports/
127
128-# UBU{ARC,CDI,REL,DVD}_EXCLUDE is what things you want to exclude
129+# UBU{ARC,CDI,REL}_EXCLUDE is what things you want to exclude
130 UBUARC_EXCLUDE="\
131 # --exclude binary-powerpc/ --exclude binary-sparc/ \
132 # --exclude daily-installer-powerpc/ --exclude daily-installer-sparc/ \
133@@ -60,10 +55,6 @@
134 UBUREL_EXCLUDE="\
135 # --exclude *-powerpc.* --exclude *-sparc.* \
136 "
137-UBUDVD_EXCLUDE="\
138-# --exclude *-powerpc.* --exclude *-sparc.* \
139-# --exclude daily/ --exclude daily-live/ \
140-"
141 UBUPOR_EXCLUDE="\
142 # --exclude binary-powerpc/ --exclude binary-sparc/ \
143 # --exclude daily-installer-powerpc/ --exclude daily-installer-sparc/ \
144
145=== modified file 'ubumirror.crontab'
146--- ubumirror.crontab 2009-12-27 13:00:51 +0000
147+++ ubumirror.crontab 2010-01-23 16:17:12 +0000
148@@ -3,7 +3,5 @@
149 03 */6 * * * ubumirror /usr/bin/ubuarchive >/dev/null
150 # Update releases mirror every four hours.
151 03 */4 * * * ubumirror /usr/bin/uburelease >/dev/null
152-# Update cdimage mirror every seven days.
153-03 11 */7 * * ubumirror /usr/bin/ubucdimage >/dev/null
154-# Update dvd mirror every seven days.
155-03 16 */7 * * ubumirror /usr/bin/ubudvd >/dev/null
156+# Update cdimage mirror every twenty-four hours.
157+03 11 * * * ubumirror /usr/bin/ubucdimage >/dev/null

Subscribers

People subscribed via source and target branches

to status/vote changes: