Skip to content

Commit e1573d2

Browse files
thesamesamnavi-desu
authored andcommitted
init.d/net-online: pass -n to ping to avoid rDNS overhead
e21b01b fixed one of the issues mentioned in Gentoo bug #650584 but not the other one. `ping` without `-n` will perform reverse DNS lookups for IPs which we don't want, as it introduces a delay and confuses the calculation we make. Bug: https://bugs.gentoo.org/650584 Bug: #353
1 parent 8d34e3f commit e1573d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

init.d/net-online.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ start ()
6666
ping_test_host="${ping_test_host:-google.com}"
6767
if [ -n "$ping_test_host" ]; then
6868
while $infinite || [ $timeout -gt 0 ]; do
69-
ping -c 1 $ping_test_host > /dev/null 2>&1
69+
ping -n -c 1 $ping_test_host > /dev/null 2>&1
7070
rc=$?
7171
[ $rc -eq 0 ] && break
7272
sleep 1

0 commit comments

Comments
 (0)