6in4: work around hanging wget process

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35408 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
Steven Barth
2013-01-30 09:05:53 +00:00
parent 94169118a2
commit 26312e0ff3
2 changed files with 5 additions and 3 deletions

View File

@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=6in4
PKG_VERSION:=13
PKG_VERSION:=14
PKG_RELEASE:=1
include $(INCLUDE_DIR)/package.mk

View File

@@ -65,8 +65,10 @@ proto_6in4_setup() {
local max=3
while [ $((++try)) -le $max ]; do
wget -qO/dev/null "$url" 2>/dev/null && break
sleep 1
( wget -qO/dev/null "$url" 2>/dev/null ) &
local pid=$!
( sleep 5; kill $pid 2>/dev/null ) &
wait $pid && break
done
}
}