openbsd-ports/www/tomcat/v4/patches/patch-bin_setclasspath_sh
2007-12-11 23:40:53 +00:00

19 lines
741 B
Plaintext

$OpenBSD: patch-bin_setclasspath_sh,v 1.2 2007/12/11 23:40:53 kurt Exp $
--- bin/setclasspath.sh.orig Sun Apr 1 15:41:32 2007
+++ bin/setclasspath.sh Tue Dec 11 08:57:14 2007
@@ -5,8 +5,14 @@
# -----------------------------------------------------------------------------
+# Read $JAVA_HOME - sudo doesn't pass environment variables
+if [ -r "%%SYSCONFDIR%%/tomcat/tomcat.rc" ]; then
+ . %%SYSCONFDIR%%/tomcat/tomcat.rc
+fi
+
# Make sure prerequisite environment variables are set
if [ -z "$JAVA_HOME" ]; then
echo "The JAVA_HOME environment variable is not defined"
echo "This environment variable is needed to run this program"
+ echo "Edit \`%%SYSCONFDIR%%/tomcat/tomcat.rc' to point to your \$JAVA_HOME"
exit 1
fi