Lines 67-77
Link Here
|
67 |
# Handle SIGINT (Ctrl-C); force abort of while() loop |
67 |
# Handle SIGINT (Ctrl-C); force abort of while() loop |
68 |
trap break SIGINT |
68 |
trap break SIGINT |
69 |
|
69 |
|
70 |
for ip in ${netwait_ip}; do |
70 |
count=${netwait_timeout} |
71 |
echo -n "Waiting for ${ip} to respond to ICMP" |
71 |
echo -n "Waiting for ${netwait_ip} to respond to ICMP" |
72 |
|
72 |
while [ ${count} -ge 0 ]; do |
73 |
count=1 |
73 |
for ip in ${netwait_ip}; do |
74 |
while [ ${count} -le ${netwait_timeout} ]; do |
|
|
75 |
/sbin/ping -t 1 -c 1 -o ${ip} >/dev/null 2>&1 |
74 |
/sbin/ping -t 1 -c 1 -o ${ip} >/dev/null 2>&1 |
76 |
rc=$? |
75 |
rc=$? |
77 |
|
76 |
|
Lines 82-90
Link Here
|
82 |
echo '.' |
81 |
echo '.' |
83 |
return |
82 |
return |
84 |
fi |
83 |
fi |
85 |
count=$((count+1)) |
84 |
count=$((count-1)) |
86 |
done |
85 |
done |
87 |
echo ': No response from host.' |
|
|
88 |
done |
86 |
done |
89 |
|
87 |
|
90 |
# Restore default SIGINT handler |
88 |
# Restore default SIGINT handler |