pptp: use resolveip, schedule restart if dns lookups fail
SVN-Revision: 31724
This commit is contained in:
parent
89532e6437
commit
189c25d318
1 changed files with 12 additions and 1 deletions
|
@ -21,7 +21,18 @@ proto_pptp_setup() {
|
|||
local load
|
||||
|
||||
json_get_var server server
|
||||
|
||||
serv_addr=
|
||||
for ip in $(resolveip -t 5 "$server"); do
|
||||
proto_add_host_dependency "$config" "$server"
|
||||
serv_addr=1
|
||||
done
|
||||
[ -n "$serv_addr" ] || {
|
||||
echo "Could not resolve server address"
|
||||
sleep 5
|
||||
proto_setup_failed "$config"
|
||||
exit 1
|
||||
}
|
||||
|
||||
json_get_var buffering buffering
|
||||
[ "${buffering:-1}" == 0 ] && buffering="--nobuffer" || buffering=
|
||||
|
|
Loading…
Reference in a new issue