X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=helper%2Fping;fp=helper%2Fping;h=2582dbe34639d53611b5456cfc4541aca2f0c3b0;hb=26fbc1fa6786b1f49610f0a806bc47cb8259a5d9;hp=180f4876db91cdc252a601417a2c7488827fc79a;hpb=fae65aa1c344fce2a68607d95ea712d61b24f78c;p=sgmon.git 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