You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by rj...@apache.org on 2011/06/20 11:26:36 UTC
svn commit: r1137558 - in /tomcat/trunk/bin: configtest.sh digest.sh
shutdown.sh startup.sh version.sh
Author: rjung
Date: Mon Jun 20 09:26:36 2011
New Revision: 1137558
URL: http://svn.apache.org/viewvc?rev=1137558&view=rev
Log:
Make Unix shell scripts for individual
commands consistent.
Modified:
tomcat/trunk/bin/configtest.sh (contents, props changed)
tomcat/trunk/bin/digest.sh
tomcat/trunk/bin/shutdown.sh
tomcat/trunk/bin/startup.sh
tomcat/trunk/bin/version.sh
Modified: tomcat/trunk/bin/configtest.sh
URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/configtest.sh?rev=1137558&r1=1137557&r2=1137558&view=diff
==============================================================================
--- tomcat/trunk/bin/configtest.sh (original)
+++ tomcat/trunk/bin/configtest.sh Mon Jun 20 09:26:36 2011
@@ -16,18 +16,15 @@
# limitations under the License.
# -----------------------------------------------------------------------------
-# configtest for the CATALINA Server
+# Configuration Test Script for the CATALINA Server
#
-# $Id: configtest.sh $
+# $Id$
# -----------------------------------------------------------------------------
# Better OS/400 detection: see Bugzilla 31132
os400=false
-darwin=false
case "`uname`" in
-CYGWIN*) cygwin=true;;
OS400*) os400=true;;
-Darwin*) darwin=true;;
esac
# resolve links - $0 may be a softlink
@@ -63,4 +60,3 @@ else
fi
exec "$PRGDIR"/"$EXECUTABLE" configtest "$@"
-
Propchange: tomcat/trunk/bin/configtest.sh
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: tomcat/trunk/bin/digest.sh
URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/digest.sh?rev=1137558&r1=1137557&r2=1137558&view=diff
==============================================================================
--- tomcat/trunk/bin/digest.sh (original)
+++ tomcat/trunk/bin/digest.sh Mon Jun 20 09:26:36 2011
@@ -21,6 +21,12 @@
# $Id$
# -----------------------------------------------------------------------------
+# Better OS/400 detection: see Bugzilla 31132
+os400=false
+case "`uname`" in
+OS400*) os400=true;;
+esac
+
# resolve links - $0 may be a softlink
PRG="$0"
@@ -38,11 +44,19 @@ PRGDIR=`dirname "$PRG"`
EXECUTABLE=tool-wrapper.sh
# Check that target executable exists
-if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
- echo "Cannot find $PRGDIR/$EXECUTABLE"
- echo "The file is absent or does not have execute permission"
- echo "This file is needed to run this program"
- exit 1
-fi
+if $os400; then
+ # -x will Only work on the os400 if the files are:
+ # 1. owned by the user
+ # 2. owned by the PRIMARY group of the user
+ # this will not work if the user belongs in secondary groups
+ eval
+else
+ if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
+ echo "Cannot find $PRGDIR/$EXECUTABLE"
+ echo "The file is absent or does not have execute permission"
+ echo "This file is needed to run this program"
+ exit 1
+ fi
+fi
exec "$PRGDIR"/"$EXECUTABLE" -server org.apache.catalina.realm.RealmBase "$@"
Modified: tomcat/trunk/bin/shutdown.sh
URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/shutdown.sh?rev=1137558&r1=1137557&r2=1137558&view=diff
==============================================================================
--- tomcat/trunk/bin/shutdown.sh (original)
+++ tomcat/trunk/bin/shutdown.sh Mon Jun 20 09:26:36 2011
@@ -21,6 +21,12 @@
# $Id$
# -----------------------------------------------------------------------------
+# Better OS/400 detection: see Bugzilla 31132
+os400=false
+case "`uname`" in
+OS400*) os400=true;;
+esac
+
# resolve links - $0 may be a softlink
PRG="$0"
@@ -38,11 +44,19 @@ PRGDIR=`dirname "$PRG"`
EXECUTABLE=catalina.sh
# Check that target executable exists
-if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
- echo "Cannot find $PRGDIR/$EXECUTABLE"
- echo "The file is absent or does not have execute permission"
- echo "This file is needed to run this program"
- exit 1
-fi
+if $os400; then
+ # -x will Only work on the os400 if the files are:
+ # 1. owned by the user
+ # 2. owned by the PRIMARY group of the user
+ # this will not work if the user belongs in secondary groups
+ eval
+else
+ if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
+ echo "Cannot find $PRGDIR/$EXECUTABLE"
+ echo "The file is absent or does not have execute permission"
+ echo "This file is needed to run this program"
+ exit 1
+ fi
+fi
exec "$PRGDIR"/"$EXECUTABLE" stop "$@"
Modified: tomcat/trunk/bin/startup.sh
URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/startup.sh?rev=1137558&r1=1137557&r2=1137558&view=diff
==============================================================================
--- tomcat/trunk/bin/startup.sh (original)
+++ tomcat/trunk/bin/startup.sh Mon Jun 20 09:26:36 2011
@@ -23,11 +23,8 @@
# Better OS/400 detection: see Bugzilla 31132
os400=false
-darwin=false
case "`uname`" in
-CYGWIN*) cygwin=true;;
OS400*) os400=true;;
-Darwin*) darwin=true;;
esac
# resolve links - $0 may be a softlink
Modified: tomcat/trunk/bin/version.sh
URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/version.sh?rev=1137558&r1=1137557&r2=1137558&view=diff
==============================================================================
--- tomcat/trunk/bin/version.sh (original)
+++ tomcat/trunk/bin/version.sh Mon Jun 20 09:26:36 2011
@@ -21,6 +21,12 @@
# $Id$
# -----------------------------------------------------------------------------
+# Better OS/400 detection: see Bugzilla 31132
+os400=false
+case "`uname`" in
+OS400*) os400=true;;
+esac
+
# resolve links - $0 may be a softlink
PRG="$0"
@@ -33,16 +39,24 @@ while [ -h "$PRG" ] ; do
PRG=`dirname "$PRG"`/"$link"
fi
done
-
+
PRGDIR=`dirname "$PRG"`
EXECUTABLE=catalina.sh
# Check that target executable exists
-if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
- echo "Cannot find $PRGDIR/$EXECUTABLE"
- echo "The file is absent or does not have execute permission"
- echo "This file is needed to run this program"
- exit 1
-fi
+if $os400; then
+ # -x will Only work on the os400 if the files are:
+ # 1. owned by the user
+ # 2. owned by the PRIMARY group of the user
+ # this will not work if the user belongs in secondary groups
+ eval
+else
+ if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
+ echo "Cannot find $PRGDIR/$EXECUTABLE"
+ echo "The file is absent or does not have execute permission"
+ echo "This file is needed to run this program"
+ exit 1
+ fi
+fi
exec "$PRGDIR"/"$EXECUTABLE" version "$@"
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org