freebsd-ports/net-mgmt/cacti88/files/patch-scripts__ping.pl
Danilo G. Baio 9133f75cb0 Repocopy from net-mgmt/cacti (r416066) -> net-mgmt/cacti88
Web-driven graphing interface for RRDTool (Old version of net-mgmt/cacti)

New releases of Cacti are still unable to work with useful plugins like
"GPS Map" and "Network Weathermap".

While here, minor fixes and get improvements from the current port.

PR:		219685
Submitted by:	Vinicius Zavam <egypcio@googlemail.com>
Approved by:	garga (mentor)
Differential Revision:	https://reviews.freebsd.org/D11023
2017-06-06 00:47:24 +00:00

11 lines
409 B
Raku

--- scripts/ping.pl.orig 2017-06-01 00:09:48 UTC
+++ scripts/ping.pl
@@ -7,7 +7,7 @@ $host =~ s/:[0-9]{1,5}/$1/gis;
# old linux version use "icmp_seq"
# newer use "icmp_req" instead
-open(PROCESS, "ping -c 1 $host | grep 'icmp_[s|r]eq' | grep time |");
+open(PROCESS, "/sbin/ping -c 1 $host | grep 'icmp_[s|r]eq' | grep time |");
$ping = <PROCESS>;
close(PROCESS);
$ping =~ m/(.*time=)(.*) (ms|usec)/;