6in4: work around hanging wget process
authorcyrus <cyrus@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 30 Jan 2013 09:05:53 +0000 (09:05 +0000)
committercyrus <cyrus@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 30 Jan 2013 09:05:53 +0000 (09:05 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35408 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/network/ipv6/6in4/Makefile
package/network/ipv6/6in4/files/6in4.sh

index cddf037..7090234 100644 (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
index ef25322..e27e86e 100755 (executable)
@@ -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
        }
 }