You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2013/07/25 21:23:33 UTC

svn commit: r1507096 - /tomcat/trunk/bin/daemon.sh

Author: markt
Date: Thu Jul 25 19:23:33 2013
New Revision: 1507096

URL: http://svn.apache.org/r1507096
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55297
Look in CATALINA_HOME for jsvc if it isn't specified and isn't found in CATALINA_BASE

Modified:
    tomcat/trunk/bin/daemon.sh

Modified: tomcat/trunk/bin/daemon.sh
URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/daemon.sh?rev=1507096&r1=1507095&r2=1507096&view=diff
==============================================================================
--- tomcat/trunk/bin/daemon.sh (original)
+++ tomcat/trunk/bin/daemon.sh Thu Jul 25 19:23:33 2013
@@ -106,7 +106,13 @@ fi
 test ".$CATALINA_HOME" = . && CATALINA_HOME=`cd "$DIRNAME/.." >/dev/null; pwd`
 test ".$CATALINA_BASE" = . && CATALINA_BASE="$CATALINA_HOME"
 test ".$CATALINA_MAIN" = . && CATALINA_MAIN=org.apache.catalina.startup.Bootstrap
-test ".$JSVC" = . && JSVC="$CATALINA_BASE/bin/jsvc"
+# If not explicitly set, look for jsvc in CATALINA_BASE first then CATALINA_HOME
+if [ -z $JSVC ]; then
+    JSVC="$CATALINA_BASE/bin/jsvc"
+    if [ ! -x $JSVC ]; then
+        JSVC="$CATALINA_HOME/bin/jsvc"
+    fi
+fi
 # Set the default service-start wait time if necessary
 test ".$SERVICE_START_WAIT_TIME" = . && SERVICE_START_WAIT_TIME=10
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r1507096 - /tomcat/trunk/bin/daemon.sh

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Mark,

On 7/25/13 4:05 PM, Mark Thomas wrote:
> On 25/07/2013 20:41, Christopher Schultz wrote:
>> Mark,
>>
>> On 7/25/13 3:23 PM, markt@apache.org wrote:
>>> Author: markt
>>> Date: Thu Jul 25 19:23:33 2013
>>> New Revision: 1507096
>>>
>>> URL: http://svn.apache.org/r1507096
>>> Log:
>>> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55297
>>> Look in CATALINA_HOME for jsvc if it isn't specified and isn't found in CATALINA_BASE
>>>
>>> Modified:
>>>     tomcat/trunk/bin/daemon.sh
>>>
>>> Modified: tomcat/trunk/bin/daemon.sh
>>> URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/daemon.sh?rev=1507096&r1=1507095&r2=1507096&view=diff
>>> ==============================================================================
>>> --- tomcat/trunk/bin/daemon.sh (original)
>>> +++ tomcat/trunk/bin/daemon.sh Thu Jul 25 19:23:33 2013
>>> @@ -106,7 +106,13 @@ fi
>>>  test ".$CATALINA_HOME" = . && CATALINA_HOME=`cd "$DIRNAME/.." >/dev/null; pwd`
>>>  test ".$CATALINA_BASE" = . && CATALINA_BASE="$CATALINA_HOME"
>>>  test ".$CATALINA_MAIN" = . && CATALINA_MAIN=org.apache.catalina.startup.Bootstrap
>>> -test ".$JSVC" = . && JSVC="$CATALINA_BASE/bin/jsvc"
>>> +# If not explicitly set, look for jsvc in CATALINA_BASE first then CATALINA_HOME
>>> +if [ -z $JSVC ]; then
>>
>> A recent discussion on the dev list [1] revealed that "-z" may not
>> always be available to the shell. Evidently, the [ ".$FOO" = . ] idiom
>> is preferred as it is more portable.
> 
> -z is used extensively throughout catalina.sh and no-one has complained
> so changing it is not an itch I feel the urge to scratch.

Good to know. We'll see how it goes.

-chris


Re: svn commit: r1507096 - /tomcat/trunk/bin/daemon.sh

Posted by Mark Thomas <ma...@apache.org>.
On 25/07/2013 20:41, Christopher Schultz wrote:
> Mark,
> 
> On 7/25/13 3:23 PM, markt@apache.org wrote:
>> Author: markt
>> Date: Thu Jul 25 19:23:33 2013
>> New Revision: 1507096
>>
>> URL: http://svn.apache.org/r1507096
>> Log:
>> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55297
>> Look in CATALINA_HOME for jsvc if it isn't specified and isn't found in CATALINA_BASE
>>
>> Modified:
>>     tomcat/trunk/bin/daemon.sh
>>
>> Modified: tomcat/trunk/bin/daemon.sh
>> URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/daemon.sh?rev=1507096&r1=1507095&r2=1507096&view=diff
>> ==============================================================================
>> --- tomcat/trunk/bin/daemon.sh (original)
>> +++ tomcat/trunk/bin/daemon.sh Thu Jul 25 19:23:33 2013
>> @@ -106,7 +106,13 @@ fi
>>  test ".$CATALINA_HOME" = . && CATALINA_HOME=`cd "$DIRNAME/.." >/dev/null; pwd`
>>  test ".$CATALINA_BASE" = . && CATALINA_BASE="$CATALINA_HOME"
>>  test ".$CATALINA_MAIN" = . && CATALINA_MAIN=org.apache.catalina.startup.Bootstrap
>> -test ".$JSVC" = . && JSVC="$CATALINA_BASE/bin/jsvc"
>> +# If not explicitly set, look for jsvc in CATALINA_BASE first then CATALINA_HOME
>> +if [ -z $JSVC ]; then
> 
> A recent discussion on the dev list [1] revealed that "-z" may not
> always be available to the shell. Evidently, the [ ".$FOO" = . ] idiom
> is preferred as it is more portable.

-z is used extensively throughout catalina.sh and no-one has complained
so changing it is not an itch I feel the urge to scratch.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r1507096 - /tomcat/trunk/bin/daemon.sh

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Mark,

On 7/25/13 3:23 PM, markt@apache.org wrote:
> Author: markt
> Date: Thu Jul 25 19:23:33 2013
> New Revision: 1507096
> 
> URL: http://svn.apache.org/r1507096
> Log:
> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55297
> Look in CATALINA_HOME for jsvc if it isn't specified and isn't found in CATALINA_BASE
> 
> Modified:
>     tomcat/trunk/bin/daemon.sh
> 
> Modified: tomcat/trunk/bin/daemon.sh
> URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/daemon.sh?rev=1507096&r1=1507095&r2=1507096&view=diff
> ==============================================================================
> --- tomcat/trunk/bin/daemon.sh (original)
> +++ tomcat/trunk/bin/daemon.sh Thu Jul 25 19:23:33 2013
> @@ -106,7 +106,13 @@ fi
>  test ".$CATALINA_HOME" = . && CATALINA_HOME=`cd "$DIRNAME/.." >/dev/null; pwd`
>  test ".$CATALINA_BASE" = . && CATALINA_BASE="$CATALINA_HOME"
>  test ".$CATALINA_MAIN" = . && CATALINA_MAIN=org.apache.catalina.startup.Bootstrap
> -test ".$JSVC" = . && JSVC="$CATALINA_BASE/bin/jsvc"
> +# If not explicitly set, look for jsvc in CATALINA_BASE first then CATALINA_HOME
> +if [ -z $JSVC ]; then

A recent discussion on the dev list [1] revealed that "-z" may not
always be available to the shell. Evidently, the [ ".$FOO" = . ] idiom
is preferred as it is more portable.

-chris

[1] http://markmail.org/thread/nynitrqknk7ywi7m