]> Sergey Matveev's repositories - sgmon.git/commitdiff
Fix ping on modern FreeBSD master
authorSergey Matveev <stargrave@stargrave.org>
Thu, 23 Nov 2023 17:39:16 +0000 (20:39 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 23 Nov 2023 17:42:17 +0000 (20:42 +0300)
helper/ping

index 180f4876db91cdc252a601417a2c7488827fc79a..2582dbe34639d53611b5456cfc4541aca2f0c3b0 100755 (executable)
@@ -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