[Why] 1. '-W' => '-w' -w <deadline> reply wait <deadline> in seconds -W <timeout> time to wait for response deadline(-w) is more appropriate than timeout(-W).
2. delete 'return 1' If ping does not receive any reply packets at all it will exit with code 1. If a packet count and deadline are both specified, and fewer than count packets are received by the time the deadline has arrived, it will also exit with code 1. On other error it exits with code 2. Otherwise it exits with code 0.
Signed-off-by: Yu Chuan 13186087857@163.com --- lib/bootstrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/bootstrap.sh b/lib/bootstrap.sh index 38965ff60755..76f07e6a7669 100755 --- a/lib/bootstrap.sh +++ b/lib/bootstrap.sh @@ -87,7 +87,7 @@ net_devices_link()
test_ping() { - ping -c 1 -W 1 $LKP_SERVER > /dev/null || return 1 + ping -c 1 -w 1 $LKP_SERVER > /dev/null }
network_ok()