#!/bin/sh

# show IP addressed of all active network cards. This is the easiest way to do it.


#needed for NFS
if [[ -e /etc/init.d/portmap ]]
then
	/etc/init.d/portmap start
fi

STARTSCRIPT=
FILENAME="tapper-automatic-test.pl"
POSSIBLE_PATHS="
/mnt/opt/tapper/bin/
/opt/tapper/bin/
/home/tapper/perl510/bin/
"
for(( i=0; i<10; i++)) 
do
    ping -c1 bancroft > /dev/null && break
    echo "wait for network available..."
    sleep 2
done

mount natrium:/vol/osrc_home/ /home
for DIR in $POSSIBLE_PATHS; do
    STARTSCRIPT=${DIR}/$FILENAME
    if [[ -e $STARTSCRIPT ]]
    then
        /sbin/ifconfig
        ${DIR}/perl $STARTSCRIPT $*
        exit 0
    fi
done


