Hi all,

Apache James is using APPASSSEMBLER to build the start/stop script, and it seems that 
APPASSSEMBLER relies on "ps -p" to work on Solaris as
well, but unfortunatly, the ordinary "ps" on Solaris does truncate the 
output... therefore, when the script to start/stop the server is
located too deeply in the file system (path too long), it no longer works.

Please see the mail that I sent to the James mailing list. The error seems to 
stem from your file:

./src/main/patches/sh.script.in

Is is possible to change this as described in the solution for James?
Thanks & regards
Michael


---------------------------------------------------------
Original post to the James mailing list
---------------------------------------------------------
Hi all,

ps -ef is truncated on Solaris to consist of maximal 80 characters, e.g. see:
  http://stackoverflow.com/questions/4892516/getting-around-truncated-ps

Therefore, the james shell script fails on Solaris when james is located in
a directory with a too long path, I needed to adapt the james.sh file like this:

Instead of this:
-----------------------------------------------
   if [ "$DIST_OS" = "macosx" ]; then
     pidtest=`$PSEXE_COMPLEX -p $pid -o command -ww | grep
"$WRAPPER_CMD" |
tail -1`
   else
     pidtest=`$PSEXE_COMPLEX -p $pid -o args | grep "$WRAPPER_CMD" |
tail -1`
   fi
-----------------------------------------------

I had to do this:
-----------------------------------------------
   if [ "$DIST_OS" = "macosx" ]; then
     pidtest=`$PSEXE_COMPLEX -p $pid -o command -ww | grep
"$WRAPPER_CMD" |
tail -1`
   elif [ "$DIST_OS" = "solaris" ]; then
     pidtest=`$PSEXE_COMPLEX awwx $pid | grep "$WRAPPER_CMD" | tail -1`
   else
     pidtest=`$PSEXE_COMPLEX -p $pid -o args | grep "$WRAPPER_CMD" |
tail -1`
   fi
-----------------------------------------------

whereas I defined $PSEXE_COMPLEX to be $PSEXE, and in case of Solaris it is 
"/usr/ucb/ps". This works fine for me. Any chance to integrate
this into the final product?

Best regards
Michael

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to