[Date Prev]   [Date Next] [Thread Prev]   [Thread Next] [Date Index]   [Thread Index]


     keepalive_monitors: 4.2.1

Ok, in 4.2.1 on Solaris 2.5.1, this now blows chunks and refuses to run
for some-odd reason (test expects an argument in/around line 88 that
tests for zero length PID):

-- begin
for p in ${PROGLIST}

   if [ -f ${PIDDIR}/${p}.pid ]; then
    PID=`head -1 ${PIDDIR}/${p}.pid`
   if [ -z $PID ]; then
     pgmname=`basename $p`;
     ps ${PSFLAGS} 2>&1 |grep -v grep |egrep "$pgmname( |\$)" >/dev/null 2>&1
     #ps ${PSFLAGS} |grep -v grep |egrep "${BIN}/${p}([ ]*|\$)" >/dev/null 2>&1
     ps ${PSNUMFLAGS} $PID | grep ${p} >/dev/null 2>&1

-- end

So, what's happening is that the PID is being forced to be undefined
(since the PID files don't exist here) and then the shell barfs...
Of course, the previous version had a condition where PID would never be
null.  So, changing it to "if [ -z $PID -o 0 ]; then" fixes the problem.

Now, of course, we're back to the old "ps: option requires an argument
-- p" complaint (which, on Solaris, is a pathing issue).


Russell M. Van Tassell                          Commercial Systems Corp.
russell@cscorp.com                               http://www.cscorp.com/

                                                     Ph: 1-888/COMM-SYS