summaryrefslogtreecommitdiff
path: root/net-misc/dhcp/files/dhcp-4.2.4-quieter-ping.patch
blob: 66a1fcd794615040909f1d25b035de85932d7aa3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
https://bugs.gentoo.org/296921

`ping -q` will still print out summary information.  send that to /dev/null.

patch by Martin Mokrejš

--- a/client/scripts/bsdos
+++ b/client/scripts/bsdos
@@ -251,7 +251,7 @@ if [ x$reason = xTIMEOUT ]; then
   sleep 1
   if [ "$new_routers" != "" ]; then
     set $new_routers
-    if ping -q -c 1 -w 1 $1; then
+    if ping -q -c 1 -w 1 $1 >/dev/null; then
       if [ x$new_ip_address != x$alias_ip_address ] && \
 			[ x$alias_ip_address != x ]; then
 	ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
--- a/client/scripts/freebsd
+++ b/client/scripts/freebsd
@@ -284,7 +284,7 @@ if [ x$reason = xTIMEOUT ]; then
   if [ -n "$new_routers" ]; then
     $LOGGER "New Routers: $new_routers"
     set -- $new_routers
-    if ping -q -c 1 $1; then
+    if ping -q -c 1 $1 >/dev/null; then
       if [ x$new_ip_address != x$alias_ip_address ] && \
 			[ x$alias_ip_address != x ]; then
 	ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
--- a/client/scripts/linux
+++ b/client/scripts/linux
@@ -253,7 +253,7 @@ if [ x$reason = xTIMEOUT ]; then
   ifconfig $interface inet $new_ip_address $new_subnet_arg \
 					$new_broadcast_arg $mtu_arg
   set $new_routers
-  if ping -q -c 1 $1; then
+  if ping -q -c 1 $1 >/dev/null; then
     if [ x$new_ip_address != x$alias_ip_address ] && \
 			[ x$alias_ip_address != x ]; then
       ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
--- a/client/scripts/netbsd
+++ b/client/scripts/netbsd
@@ -251,7 +251,7 @@ if [ x$reason = xTIMEOUT ]; then
   sleep 1
   if [ "$new_routers" != "" ]; then
     set $new_routers
-    if ping -q -c 1 -w 1 $1; then
+    if ping -q -c 1 -w 1 $1 >/dev/null; then
       if [ x$new_ip_address != x$alias_ip_address ] && \
 			[ x$alias_ip_address != x ]; then
 	ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
--- a/client/scripts/openbsd
+++ b/client/scripts/openbsd
@@ -245,7 +245,7 @@ if [ x$reason = xTIMEOUT ]; then
   sleep 1
   if [ "$new_routers" != "" ]; then
     set $new_routers
-    if ping -q -c 1 -w 1 $1; then
+    if ping -q -c 1 -w 1 $1 >/dev/null; then
       if [ x$new_ip_address != x$alias_ip_address ] && \
 			[ x$alias_ip_address != x ]; then
 	ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
--- a/client/scripts/openwrt
+++ b/client/scripts/openwrt
@@ -186,7 +186,7 @@ if [ x$reason = xTIMEOUT ]; then
   ifconfig $interface $new_ip_address $new_subnet_arg \
 				$new_broadcast_arg $mtu_arg $metric_arg
   set $new_routers
-  if ping -q -c 1 $1; then
+  if ping -q -c 1 $1 >/dev/null; then
     if [ x$new_ip_address != x$alias_ip_address ] && \
 			[ x$alias_ip_address != x ]; then
       ifconfig $interface:0 $alias_ip_address $alias_subnet_arg