]> Sergey Matveev's repositories - sgmon.git/blobdiff - helper/ping
Fix ping on modern FreeBSD
[sgmon.git] / 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