• R/O
  • HTTP
  • SSH
  • HTTPS

ppp-resource-agents: 提交


Commit MetaInfo

修订版3a12dc59ad4d50f716a855f07badbc93370503ea (tree)
时间2019-07-02 14:32:44
作者Tatsuki Sugiura <sugi@nemu...>
CommiterTatsuki Sugiura

Log Message

Stop checking IP address on start to avoid fatal error.

更改概述

差异

--- a/PPPConnection
+++ b/PPPConnection
@@ -176,15 +176,6 @@ ppp_start() {
176176 sleep $OCF_RESKEY_pon_wait_sec
177177 fi
178178 done
179- tries=0
180- while ! ppp_check_ip; do
181- tries=`expr $tries + 1`
182- sleep 1
183- if [ "$tries" -gt "$OCF_RESKEY_ip_wait_sec" ]; then
184- ocf_log err "Timeout to aquire expected IP address ${IP4} ${IP6}."
185- return $OCF_ERR_GENERIC
186- fi
187- done
188179 return $OCF_SUCCESS
189180 }
190181
@@ -234,10 +225,16 @@ ppp_echo_status() {
234225 echo "disconnected"
235226 return 0
236227 fi
237- if ! ppp_check_ip; then
238- echo "connecting"
239- return 0
240- fi
228+ tries=0
229+ while ! ppp_check_ip; do
230+ tries=`expr $tries + 1`
231+ if [ "$tries" -gt "$OCF_RESKEY_ip_wait_sec" ]; then
232+ ocf_log err "Timeout for waiting expected IP address (${IP4} ${IP6})."
233+ echo "connecting"
234+ return 0
235+ fi
236+ sleep 1
237+ done
241238 echo "connected"
242239 return 0
243240 }
Show on old repository browser