From: Sergey Matveev Date: Thu, 23 Nov 2023 17:39:16 +0000 (+0300) Subject: Fix ping on modern FreeBSD X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=26fbc1fa6786b1f49610f0a806bc47cb8259a5d9;hp=fae65aa1c344fce2a68607d95ea712d61b24f78c;p=sgmon.git Fix ping on modern FreeBSD --- diff --git a/helper/ping b/helper/ping index 180f487..2582dbe 100755 --- a/helper/ping +++ b/helper/ping @@ -2,8 +2,7 @@ proto=$1 shift -[ "$proto" = "6" ] || proto="" -if ping${proto} -c 1 $@ > state/ping-out ; then +if ping -${proto} -c 1 $@ > state/ping-out ; then tail -1 < state/ping-out else cat state/ping-out