--- ./bin/foamInstallationTest.orig Fri Aug 3 22:38:53 2007 +++ ./bin/foamInstallationTest Fri Aug 3 22:41:59 2007 @@ -92,7 +92,7 @@ if [ $LDIFF -le 1 ]; then while [ $LDIFF -lt 0 ] ; do WORD="$WORD " - LDIFF=`expr $LDIFF + 1` + LDIFF=`expr 0 + $LDIFF + 1` done echo "$WORD" else @@ -319,6 +319,16 @@ RESULT="Networking_cannot_reach_$1" fi ;; + FreeBSD) + PINGTEST=`/sbin/ping -c 1 $1 2>&1` + if [ "`echo $PINGTEST | grep "1 packets received"`" != "" ] ; then + RESULT="Successful" + elif [ "`echo $PINGTEST | grep "unknown host"`" != "" ] ; then + RESULT="No_entry_for_\"$1\"_in_/etc/hosts" + else + RESULT="Networking_cannot_reach_$1" + fi + ;; *) PINGTEST=`/bin/ping -w 3 -c 1 $1 2>&1` if [ "`echo $PINGTEST | grep "1 received"`" != "" ] ; then @@ -433,12 +443,12 @@ echo "`fixlen "Host:" $WIDTH` ${HOST_NAME}" fi # -if [ "$OS" = "Linux" ] || [ "$OS" = "LinuxAMD64" ] || [ "$OS" = "SunOS" ]; then +if [ "$OS" = "Linux" ] || [ "$OS" = "LinuxAMD64" ] || [ "$OS" = "FreeBSD" ] || [ "$OS" = "SunOS" ]; then echo "`fixlen "OS:" $WIDTH` ${OS} version ${OS_VERSION}" else echo "FATAL ERROR: Incompatible operating system \"$OS\"." echo " Foam${FOAM_VERSION} is currently " - echo " available for Linux and SunOS only." + echo " available for Linux, FreeBSD and SunOS only." echo FATALERROR=`expr $FATALERROR + 1` fi @@ -556,10 +566,10 @@ hline #-------------------- echo "$COL1 $COL2 $COL3" hline #-------------------- -reportExecutable gcc "${WM_COMPILER_DIR}/bin/gcc" +reportExecutable gcc "/usr/bin/gcc" reportExecutable java "${JAVA_HOME}/bin/java" reportExecutable gzip -if [ "$OS" = "Linux" ] ; then +if [ "$OS" = "Linux" ] || [ "$OS" = "FreeBSD" ] ; then reportExecutable tar else reportExecutable gtar