Ignore:
Timestamp:
2012-05-14T22:58:16+02:00 (5 years ago)
Author:
nbd
Message:

pptp: use resolveip, schedule restart if dns lookups fail

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/pptp/files/pptp.sh

    r31605 r31724  
    2222 
    2323        json_get_var server server 
    24         proto_add_host_dependency "$config" "$server" 
     24 
     25        serv_addr= 
     26        for ip in $(resolveip -t 5 "$server"); do 
     27                proto_add_host_dependency "$config" "$server" 
     28                serv_addr=1 
     29        done 
     30        [ -n "$serv_addr" ] || { 
     31                echo "Could not resolve server address" 
     32                sleep 5 
     33                proto_setup_failed "$config" 
     34                exit 1 
     35        } 
    2536 
    2637        json_get_var buffering buffering 
Note: See TracChangeset for help on using the changeset viewer.