Script Question

From: Fiengo, Paul (Contractor) (FiengoP@ritchie.disa.mil)
Date: Tue Nov 25 2003 - 12:17:29 EST


All Gurus and Gurettes:

I am having an issue with a script that I am writing. For some reason my
"&&" operation is not working properly and I do not know why. If either
condition exists, the result of the expression is returning true whereas it
should be false. That is my understanding anyway. Can someone please tell
me what I am doing wrong. I have tried different test operators such as ((
)), or [[ ]] which output different results. (Bad number) Not sure what
that is. I am running Solaris 8 02/02 on an E250. My patch cluster is a
month old (108528-24). Any assistance would be greatly appreciated.

if test "`ps -ef | grep /oob-in/security/logs/NT/ascii | grep -v grep && ps
-ef | grep /oob-in/security/logs/NT/binary | grep -v grep`"

                then

                if [ -f $CONLOCK ]

                        then

                        else touch $CONLOCK

                fi
                        else echo `date` "icsspdchk-co... The ICSSPD Daemon
is not running. Removing the condition lock file. Attempting to start the
ICSSPD Daemon." >> $ASERRLOG

                        rm $CONLOCK

                        /etc/init.d/icsspd.A start >> $ASERRLOG

                        /etc/init.d/icsspd.B start >> $ASERRLOG

                        if test "` ps -ef | grep
/oob-in/security/logs/NT/ascii | grep -v grep && ps -ef | grep
/oob-in/security/logs/NT/binary | grep -v grep`"

                                then

                                echo `date` "icsspdchk-co... ICSSPD Daemon
started successfully. Creating the condition lock file. Please ensure that
the NT feeder systems are sending audit data." >> $ASERRLOG

                                touch $CONLOCK

                                return

                                else echo `date` "icsspdchk-co... Unable to
start the ICSSPD Daemon. Please check system immediately." >> $ASERRLOG

                                exit

                        fi

        fi

Paul Fiengo
DISA FSO / CACI
_______________________________________________
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:27:33 EDT