Author: nextgens
Date: 2006-05-27 08:43:47 +0000 (Sat, 27 May 2006)
New Revision: 8880
Modified:
trunk/apps/installer/installclasspath/config/wrapper.conf
trunk/apps/installer/installclasspath/run.sh
Log:
installer: reinsert the 0.5 workaround... Will probably clash on weird setups
but is better than what we were doing
Modified: trunk/apps/installer/installclasspath/config/wrapper.conf
===================================================================
--- trunk/apps/installer/installclasspath/config/wrapper.conf 2006-05-27
00:53:10 UTC (rev 8879)
+++ trunk/apps/installer/installclasspath/config/wrapper.conf 2006-05-27
08:43:47 UTC (rev 8880)
@@ -17,8 +17,6 @@
wrapper.syslog.loglevel=NONE
wrapper.console.title=Freenet 0.7
wrapper.jvm_exit.timeout=120
-# Workaround a JVM bug on *NIX
-set.default.LD_ASSUME_KERNEL=2.4.1
# Name of the service
wrapper.ntservice.name=@serviceName@
Modified: trunk/apps/installer/installclasspath/run.sh
===================================================================
--- trunk/apps/installer/installclasspath/run.sh 2006-05-27 00:53:10 UTC
(rev 8879)
+++ trunk/apps/installer/installclasspath/run.sh 2006-05-27 08:43:47 UTC
(rev 8880)
@@ -54,6 +54,32 @@
exit 1
fi
+# and get java implementation too, Sun JDK or Kaffe
+JAVA_IMPL=`java -version 2>&1 | head -n 1 | cut -f1 -d' '`
+
+# sun specific options
+LDPROP=""
+if [ "$JAVA_IMPL" = "java" ]
+then
+ echo Sun java detected.
+ # Tell it not to use NPTL.
+ # BAD THINGS happen if it uses NPTL.
+ # Specifically, at least on 1.4.1. and 1.5.0b2, we get hangs
+ # where many threads are stuck waiting for a lock to be
+ # unlocked but no thread owns it.
+ if test -f /etc/redhat-release
+ then
+ LDPROP="2.2.5"
+ #gentoo however dies with 2.2.5
+ elif test -f /etc/gentoo-release -o -f /etc/SuSE-release
+ then
+ LDPROP="2.4.1"
+ else
+ LDPROP="2.2.5"
+ fi
+fi
+
+
# Get the fully qualified path to the script
case $0 in
/*)
@@ -374,7 +400,7 @@
getpid
if [ "X$pid" = "X" ]
then
- COMMAND_LINE="$CMDNICE $WRAPPER_CMD $WRAPPER_CONF
wrapper.syslog.ident=$APP_NAME wrapper.pidfile=$PIDFILE wrapper.daemonize=TRUE
$ANCHORPROP $IGNOREPROP $LOCKPROP"
+ COMMAND_LINE="$CMDNICE $WRAPPER_CMD $WRAPPER_CONF
wrapper.syslog.ident=$APP_NAME wrapper.pidfile=$PIDFILE $LDPROP
wrapper.daemonize=TRUE $ANCHORPROP $IGNOREPROP $LOCKPROP"
exec $COMMAND_LINE
else
echo "$APP_LONG_NAME is already running."