6in4: work around hanging wget process
authorSteven Barth <cyrus@openwrt.org>
Wed, 30 Jan 2013 09:05:53 +0000 (09:05 +0000)
committerSteven Barth <cyrus@openwrt.org>
Wed, 30 Jan 2013 09:05:53 +0000 (09:05 +0000)
SVN-Revision: 35408

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

index cddf0372e5d7fca59619bf2b83c81d2f06e448d2..7090234358d221371b7582a250040bbecec78d73 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 ef2532234619bb7664adde365394423a5aba8ea9..e27e86ef085941198369b391e79f1e6b4e0a81d8 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
        }
 }