projects
/
openwrt
/
staging
/
thess.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
89532e6
)
pptp: use resolveip, schedule restart if dns lookups fail
author
Felix Fietkau
<nbd@openwrt.org>
Mon, 14 May 2012 20:58:16 +0000
(20:58 +0000)
committer
Felix Fietkau
<nbd@openwrt.org>
Mon, 14 May 2012 20:58:16 +0000
(20:58 +0000)
SVN-Revision: 31724
package/pptp/files/pptp.sh
patch
|
blob
|
history
diff --git
a/package/pptp/files/pptp.sh
b/package/pptp/files/pptp.sh
index 00239850cc49a1112d209420b900c18f72ca7283..347df346c0f2b63932bf45147a80fe27926729aa 100755
(executable)
--- a/
package/pptp/files/pptp.sh
+++ b/
package/pptp/files/pptp.sh
@@
-21,7
+21,18
@@
proto_pptp_setup() {
local load
json_get_var server server
- proto_add_host_dependency "$config" "$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=