[debian-edu-commits] debian-edu/ 01/01: Add 30 second timeout and the number of tries to 3 for wget in the apt-setup and debian-edu-profile scripts using wget to check if services are available, to make sure blocked networks do not cause the installation to hang forever.
Petter Reinholdtsen
pere at moszumanska.debian.org
Thu Oct 23 09:42:49 UTC 2014
This is an automated email from the git hooks/post-receive script.
pere pushed a commit to branch master
in repository debian-edu-install.
commit bf2c382c774ae9576eb967ae8159ca0b54a87138
Author: Petter Reinholdtsen <pere at hungry.com>
Date: Thu Oct 23 11:42:41 2014 +0200
Add 30 second timeout and the number of tries to 3 for wget in the apt-setup and debian-edu-profile scripts using wget to check if services are available, to make sure blocked networks do not cause the installation to hang forever.
---
apt-setup/generators/70debian-edu-install | 6 +++---
debian-edu-profile | 6 +++---
debian/changelog | 9 +++++++++
3 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/apt-setup/generators/70debian-edu-install b/apt-setup/generators/70debian-edu-install
index b501a6d..420ff2d 100755
--- a/apt-setup/generators/70debian-edu-install
+++ b/apt-setup/generators/70debian-edu-install
@@ -28,7 +28,7 @@ DISTRIBUTION="$RET"
# Prevent installer to contact security host as we don't have network
# connection. Setting apt-setup/security_host to an empty value will
# make apt-setup/generators/90security skip the security mirror
-if ! wget -qO - http://security.debian.org/dists/$DISTRIBUTION/updates/Release ; then
+if ! wget --timeout=30 --tries=3 -qO - http://security.debian.org/dists/$DISTRIBUTION/updates/Release ; then
log "Disabling security mirror, unable to reach it using http/wget"
db_fset apt-setup/security_host seen true || true
db_set apt-setup/security_host "" || true
@@ -37,7 +37,7 @@ else
fi
# Prevent installer from contacting volatile too if it isn't working.
-if ! wget -qO - http://volatile.debian.org/debian-volatile/dists/$DISTRIBUTION/volatile/Release ; then
+if ! wget --timeout=30 --tries=3 -qO - http://volatile.debian.org/debian-volatile/dists/$DISTRIBUTION/volatile/Release ; then
log "Disabling volatile mirror, unable to reach it using http/wget"
db_fset apt-setup/volatile_host seen true || true
db_set apt-setup/volatile_host "" || true
@@ -85,7 +85,7 @@ if [ "$PROTOCOL" = "http" ] ; then
db_get mirror/http/directory || true
DIRECTORY="$RET"
echo >> $file
- if wget -qO - http://$MIRROR$DIRECTORY/dists/$codename/Release | grep -q " local/binary" ; then
+ if wget --timeout=30 --tries=3 -qO - http://$MIRROR$DIRECTORY/dists/$codename/Release | grep -q " local/binary" ; then
log "OK, Found local/binary, adding local to $file"
echo >> $file
echo "deb http://$MIRROR$DIRECTORY $codename local" >> $file
diff --git a/debian-edu-profile b/debian-edu-profile
index b96ba30..e4d1c10 100755
--- a/debian-edu-profile
+++ b/debian-edu-profile
@@ -156,7 +156,7 @@ touch $preseedfile
# workstation for non-laptops, and roaming-workstation for laptops.
# If more than one network interface is detected, preselect
# Thin-Client-Server for non-laptops.
-if wget http://tjener/debian-edu-install.dat > /dev/null 2>&1 ; then
+if wget --timeout=30 --tries=3 http://tjener/debian-edu-install.dat > /dev/null 2>&1 ; then
log "main-server detected on the network"
if laptop-detect ; then
log "laptop detected, preselecting roaming workstation"
@@ -452,7 +452,7 @@ set_mirror_info () {
cp $path $APTLISTDIR/tmp 2>/dev/null || nogetrel="$path"
else
path="$PROTOCOL://$MIRROR$DIRECTORY/dists/$SUITE/Release"
- wget -q "$path" -O $APTLISTDIR/tmp || nogetrel="$path"
+ wget --timeout=30 --tries=3 -q "$path" -O $APTLISTDIR/tmp || nogetrel="$path"
fi
if [ "$nogetrel" != "" ]; then
@@ -491,7 +491,7 @@ if [ -f /cdrom/.disk/cd_type ] && egrep -iq 'dvd|bluray' /cdrom/.disk/cd_type; t
db_set "apt-setup/local0/repository" "" || true
db_set "apt-setup/local0/source" true || true
-elif ! log-output wget -U "Wget, Debian Edu d-i $de_suite $archstr" -qO - http://ftp.skolelinux.org/welcome.msg ; then
+elif ! log-output wget --timeout=30 --tries=3 -U "Wget, Debian Edu d-i $de_suite $archstr" -qO - http://ftp.skolelinux.org/welcome.msg ; then
db_settitle debian-edu-install/no-network/title
db_input critical "debian-edu-install/no-network" || true
db_go || true
diff --git a/debian/changelog b/debian/changelog
index 7d96cea..a7acbde 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+debian-edu-install (1.815) UNRELEASED; urgency=low
+
+ * Add 30 second timeout and the number of tries to 3 for wget in the
+ apt-setup and debian-edu-profile scripts using wget to check if
+ services are available, to make sure blocked networks do not cause
+ the installation to hang forever.
+
+ -- Petter Reinholdtsen <pere at debian.org> Thu, 23 Oct 2014 11:41:15 +0200
+
debian-edu-install (1.814) unstable; urgency=medium
* Mention jessie in internal template in
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/debian-edu-install.git
More information about the debian-edu-commits
mailing list