Merge "Fix download_mirror.sh without -n"
This commit is contained in:
commit
778704c1dc
@ -11,7 +11,7 @@
|
|||||||
# By default, we use "sudo" and we don't use a local yum.conf. These can
|
# By default, we use "sudo" and we don't use a local yum.conf. These can
|
||||||
# be overridden via flags.
|
# be overridden via flags.
|
||||||
|
|
||||||
SUDOCMD="sudo -E"
|
SUDO="sudo -E"
|
||||||
RELEASEVER="--releasever=7"
|
RELEASEVER="--releasever=7"
|
||||||
YUMCONFOPT=""
|
YUMCONFOPT=""
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ while getopts "c:nxD:sSuUh" o; do
|
|||||||
case "${o}" in
|
case "${o}" in
|
||||||
n)
|
n)
|
||||||
# No-sudo
|
# No-sudo
|
||||||
SUDOCMD=""
|
SUDO=""
|
||||||
;;
|
;;
|
||||||
x)
|
x)
|
||||||
# Clean only
|
# Clean only
|
||||||
@ -425,8 +425,8 @@ init_dl_env
|
|||||||
# Prime the cache
|
# Prime the cache
|
||||||
loop_count=0
|
loop_count=0
|
||||||
max_loop_count=5
|
max_loop_count=5
|
||||||
echo "${SUDOCMD} yum ${YUMCONFOPT} ${RELEASEVER} makecache"
|
echo "${SUDO} yum ${YUMCONFOPT} ${RELEASEVER} makecache"
|
||||||
while ! ${SUDOCMD} yum ${YUMCONFOPT} ${RELEASEVER} makecache fast ; do
|
while ! ${SUDO} yum ${YUMCONFOPT} ${RELEASEVER} makecache fast ; do
|
||||||
# To protect against intermittent 404 errors, we'll retry
|
# To protect against intermittent 404 errors, we'll retry
|
||||||
# a few times. The suspected issue is pulling repodata
|
# a few times. The suspected issue is pulling repodata
|
||||||
# from multiple source that are temporarily inconsistent.
|
# from multiple source that are temporarily inconsistent.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user