functions-network.php patch for OpenBSD ping binary
phpipam open-source IP address management
Brought to you by:
myha
Tests fine on OpenBSD 5.5, and -current using phpipam-1.0.
OpenBSD ping(8) man pages suggest this change is compatible back to OpenBSD 2.2
--- functions-network.php.orig Fri Sep 26 23:57:57 2014 +++ functions-network.php Sat Sep 27 00:05:41 2014 @@ -2906,8 +2906,8 @@ } else { //set ping command based on OS type - if(PHP_OS == "FreeBSD" || PHP_OS == "NetBSD" || PHP_OS == "OpenBSD") { $cmd = "$pathPing -c $count -W ".($timeout*1000)." $ip 1>/dev/null 2>&1"; } - elseif(PHP_OS == "Linux") { $cmd = "$pathPing -c $count -w $timeout $ip 1>/dev/null 2>&1"; } + if(PHP_OS == "FreeBSD" || PHP_OS == "NetBSD") { $cmd = "$pathPing -c $count -W ".($timeout*1000)." $ip 1>/dev/null 2>&1"; } + elseif(PHP_OS == "Linux" || PHP_OS == "OpenBSD") { $cmd = "$pathPing -c $count -w $timeout $ip 1>/dev/null 2>&1"; } elseif(PHP_OS == "WIN32" || PHP_OS == "Windows" || PHP_OS == "WINNT") { $cmd = "$pathPing -n $count -I ".($timeout*1000)." $ip 1>/dev/null 2>&1"; } else { $cmd = "$pathPing -c $count -n $ip 1>/dev/null 2>&1"; }
Anonymous
Forgot to attach the patch. :]
Last edit: Emille Blanc 2014-09-27
Thanks, will fix for next release.
ray ban sunglasses
ray ban wayfarer
cheap ray ban sunglasses
http://tiffanyandco.lakecerr.com