freebsd-ports/science/openfoam/files/patch-bin_foamSystemCheck
Thierry Thomas 9a25fbb6a0 Upgrade OpenFOAM to 1.3.
Changelog at <http://www.opencfd.co.uk/openfoam/version1.3.html>.

PR:		95205
Submitted by:	/me
2006-04-01 20:24:07 +00:00

24 lines
803 B
Text

--- bin/foamSystemCheck.orig Fri Mar 24 16:44:29 2006
+++ bin/foamSystemCheck Thu Mar 30 23:09:31 2006
@@ -119,6 +119,21 @@
RESULT="Ping_not_installed_in_usual_path"
fi
;;
+ FreeBSD)
+ if [ -x '/sbin/ping' ] ; then
+ PINGTEST=`/sbin/ping -c 1 $1 2>&1`
+ if [ -n "`echo $PINGTEST | grep '1 packets received'`" ] ; then
+ RESULT="Successful"
+ elif [ -n "`echo $PINGTEST | grep 'unknown host'`" ] ; then
+ RESULT='Unknown host'
+ else
+ RESULT='Networking not set'
+ fi
+ else
+ RESULT="Ping_not_installed_in_usual_path"
+ fi
+ ;;
+
*)
if [ -x '/bin/ping' ] ; then
PINGTEST=`/bin/ping -w 3 -c 1 $1 2>&1`