Script Question

From: Fiengo, Paul (Contractor) (FiengoP@ritchie.disa.mil)
Date: Wed Feb 19 2003 - 18:15:35 EST


Gurus,

I have a script that is producing the following error:

/logproc/restartdb[12]: 3 == : more tokens expected

The script's function is to ensure that a number of system processes are
true and if that being the case; to move it's audit files to different
locations for archiving. Looking at the error message I would make the
initial assumption that line 12 of the script is causing the error message.
When you review my script you will see that this is probably not the case.
So now I'm keying in on the "==" portion of the error message. But when it
comes down to it, I have no idea why. Seems like the code is straight
forward. Does anyone have any ideas? This script is executed through cron
once a minute. A portion of the script follows (part with the "=="
statement):

#
# Set variable for restartdb script
#
ASHOME=/logproc
ASASCIPT=/storage/oracle/SUNTOTAL
ASERRLOG=/tmp/ASERRLOG
ASBINPT=/var/process/datafiles/SUN
DBMNTPT=/var/process
DBAUDPT=/var/audit
TIME=`date +%m%d%y.%H%M%S`
TEMP=/var/audit/temp
#
#
#
# Check the system run state sub-routine
#
function initchk
{
        state=3
        if [ -f $ASHOME/initstate ]
                then
                exec 5< $ASHOME/initstate
                read -u5 current
                if (( $state == $current ))
                        then
                        exec 5<&-
                        return
                        else echo `date` "restartdb... Current run state
is not 3. Exiting script." >> $ASERRLOG
                        exit
                fi
                else echo `date` "restartdb... $ASHOME/initstate file not
present. Unable to determine current run state. Exiting script." >>
$ASERRLOG
                exit
        fi
}

There are no other "==" statements in the script. My details are that I'm
running Solaris 8 02/02 with the most current patches on a SunFire 280R. I
will summarize.

Paul Fiengo
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:25:51 EDT