Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 129597 Details for
Bug 143535
net-misc/moblock (new ebuild)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
update script - added mirror support
moblock-update (text/plain), 2.08 KB, created by
Daniel Santos
on 2007-08-30 07:34:45 UTC
(
hide
)
Description:
update script - added mirror support
Filename:
MIME Type:
Creator:
Daniel Santos
Created:
2007-08-30 07:34:45 UTC
Size:
2.08 KB
patch
obsolete
>#!/bin/bash > >BLOCKLISTSUFFIX="gz" >FAIL=0 > >source /etc/conf.d/moblock >source /sbin/functions.sh > >if [ -z "${BLOCKLISTSERVERS}" ]; then > eerror There is no BLOCKLISTSERVERS defined in /etc/conf.d/moblock. > eindent > eerror Please set this variable to the server you wish to download from. > eoutdent > > FAIL=1 >fi > >if [ -z "${BLOCKLISTS}" ]; then > eerror There is no BLOCKLISTS defined in /etc/conf.d/moblock. > eindent > eerror Please set this variable to the lists you wish to use. > eoutdent > > FAIL=1 >fi > >if [ -z "${BLOCKLISTFILE}" ]; then > eerror There is no BLOCKLISTFILE defined in /etc/conf.d/moblock. > eindent > eerror Please set this variable to the file you wish to output the > eerror merged block list to. > eoutdent > > FAIL=1 >fi > >if [ -z "${BLOCKLISTDIR}" ]; then > eerror There is no BLOCKLISTDIR defined in /etc/conf.d/moblock. > eindent > eerror Please set this variable to the directory you wish to store > eerror the downloaded lists in. > eoutdent > > FAIL=1 >fi > >if [ "${FAIL}" != "0" ]; then > exit 1 >fi > ># Iterate through servers until we get one to work or they all fail. >getAFile() { > for url in ${BLOCKLISTSERVERS}; do > wget -P ${BLOCKLISTDIR} \ > -N ${url}/${1}.${BLOCKLISTSUFFIX} \ > -a ${BLOCKLISTDIR}/update.log \ > && return 0; > done >} > >einfo Updating moblock... >eindent >einfo Downloading lists... >eindent > >mkdir -p ${BLOCKLISTDIR} > >for i in ${BLOCKLISTS}; do > ebegin Downloading ${i} > > getAFile $i > > eend $? Failed to download ${i} > > if [ "$?" != "0" ]; then > FAIL=1 > fi >done > >eoutdent > >if [ "${FAIL}" != "0" ]; then > ewarn Some lists were not downloaded. >fi > >FAIL=0 > >einfo Unpacking and merging lists... >eindent > >mv ${BLOCKLISTFILE} ${BLOCKLISTFILE}.backup 2>/dev/null > >for i in ${BLOCKLISTS}; do > ebegin Merging ${i} > > gunzip -c ${BLOCKLISTDIR}/${i}.${BLOCKLISTSUFFIX} >> ${BLOCKLISTFILE} 2>/dev/null > > eend $? Failed to unpack and merge ${i} > > if [ "$?" != "0" ]; then > FAIL=1 > fi >done > >eoutdent > >if [ "${FAIL}" != "0" ]; then > eerror Some lists were not merged. Restoring backup of previous list. > mv ${BLOCKLISTFILE}.backup ${BLOCKLISTFILE} 2> /dev/null > exit 1 >fi > >eoutdent > >einfo moblock update complete >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 143535
:
94168
|
102477
|
123081
|
129597
|
129601
|
129602
|
129660
|
129824
|
135230
|
140004
|
143160
|
162794
|
187672
|
202755
|
202771
|
202826
|
203869