comgt: add delay option for 3g proto
[openwrt/staging/dedeckeh.git] / package / network / utils / comgt / files / 3g.sh
index 0d02d4c4b989de24ebbe336749cc88373cf21eec..9220cbf5a0af17f07c39fda909a16d78c8752c58 100644 (file)
@@ -17,6 +17,7 @@ proto_3g_init_config() {
        proto_config_add_string "apn"
        proto_config_add_string "service"
        proto_config_add_string "pincode"
+       proto_config_add_string "delay"
        proto_config_add_string "dialnumber"
 }
 
@@ -29,6 +30,7 @@ proto_3g_setup() {
        json_get_var service service
        json_get_var pincode pincode
        json_get_var dialnumber dialnumber
+       json_get_var delay delay
 
        [ -n "$dat_device" ] && device=$dat_device
 
@@ -38,6 +40,8 @@ proto_3g_setup() {
                return 1
        }
 
+       [ -n "$delay" ] && sleep "$delay"
+
        case "$service" in
                cdma|evdo)
                        chat="/etc/chatscripts/evdo.chat"