Révision | 3a12dc59ad4d50f716a855f07badbc93370503ea (tree) |
---|---|
l'heure | 2019-07-02 14:32:44 |
Auteur | Tatsuki Sugiura <sugi@nemu...> |
Commiter | Tatsuki Sugiura |
Stop checking IP address on start to avoid fatal error.
@@ -176,15 +176,6 @@ ppp_start() { | ||
176 | 176 | sleep $OCF_RESKEY_pon_wait_sec |
177 | 177 | fi |
178 | 178 | 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 | |
188 | 179 | return $OCF_SUCCESS |
189 | 180 | } |
190 | 181 |
@@ -234,10 +225,16 @@ ppp_echo_status() { | ||
234 | 225 | echo "disconnected" |
235 | 226 | return 0 |
236 | 227 | 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 | |
241 | 238 | echo "connected" |
242 | 239 | return 0 |
243 | 240 | } |