[freenet-cvs] r20964 - in trunk/apps/new_installer: res/unix/bin scripts

nextgens at freenetproject.org nextgens at freenetproject.org
Fri Jul 4 09:04:22 UTC 2008


Author: nextgens
Date: 2008-07-04 09:04:22 +0000 (Fri, 04 Jul 2008)
New Revision: 20964

Modified:
   trunk/apps/new_installer/res/unix/bin/setup.sh
   trunk/apps/new_installer/scripts/1run.sh
Log:
new_installer: tell the user if his jvm is behaving weird; maybe we should link to some wiki-page or something ?

Modified: trunk/apps/new_installer/res/unix/bin/setup.sh
===================================================================
--- trunk/apps/new_installer/res/unix/bin/setup.sh	2008-07-04 08:48:02 UTC (rev 20963)
+++ trunk/apps/new_installer/res/unix/bin/setup.sh	2008-07-04 09:04:22 UTC (rev 20964)
@@ -39,8 +39,26 @@
 else
 	echo "Online installation mode"
 	echo "Downloading the wrapper binaries"
-	java $JOPTS -jar bin/sha1test.jar wrapper_$OS.zip . "$CAFILE" >/dev/null
+	java $JOPTS -jar bin/sha1test.jar wrapper_$OS.zip . "$CAFILE" 2>jvmerror >/dev/null
 fi
+
+if test -s jvmerror 
+then
+	echo "#################################################################"
+	echo "It seems that you are using a buggy JVM..."
+	echo "The installer will refuse to run until you switch to a decent one"
+	echo "#################################################################"
+	echo "You are currently using:"
+	java -version
+	echo "#################################################################"
+	echo "The full error message is :"
+	echo "#################################################################"
+	cat jvmerror
+	touch .isInstalled
+	exit 0
+fi
+rm -f jvmerror
+
 java $JOPTS -jar bin/uncompress.jar wrapper_$OS.zip . 2>&1 >/dev/null
 # We need the exec flag on /bin
 chmod u+x bin/* lib/*

Modified: trunk/apps/new_installer/scripts/1run.sh
===================================================================
--- trunk/apps/new_installer/scripts/1run.sh	2008-07-04 08:48:02 UTC (rev 20963)
+++ trunk/apps/new_installer/scripts/1run.sh	2008-07-04 09:04:22 UTC (rev 20964)
@@ -63,14 +63,31 @@
 echo "fcp.enabled=true" >> freenet.ini
 echo "fcp.port=$FCP_PORT" >> freenet.ini
 
+echo "Downloading update.sh"
+java $JOPTS -jar bin/sha1test.jar update.sh "." $CAFILE >/dev/null 2>jvmerror || exit 1
+if test -s jvmerror 
+then
+	echo "#################################################################"
+	echo "It seems that you are using a buggy JVM..."
+	echo "The installer will refuse to run until you switch to a decent one"
+	echo "#################################################################"
+	echo "You are currently using:"
+	java -version
+	echo "#################################################################"
+	echo "The full error message is :"
+	echo "#################################################################"
+	cat jvmerror
+	touch .isInstalled
+	exit 0
+fi
+rm -f jvmerror
+chmod a+rx "./update.sh"
+
 echo "Downloading freenet-stable-latest.jar"
 java $JOPTS -jar bin/sha1test.jar freenet-stable-latest.jar "." $CAFILE >/dev/null || exit 1 
 ln -s freenet-stable-latest.jar freenet.jar
 echo "Downloading freenet-ext.jar"
 java $JOPTS -jar bin/sha1test.jar freenet-ext.jar "." $CAFILE >/dev/null || exit 1
-echo "Downloading update.sh"
-java $JOPTS -jar bin/sha1test.jar update.sh "." $CAFILE >/dev/null || exit 1
-chmod a+rx "./update.sh"
 
 # Register plugins
 mkdir -p plugins




More information about the cvs mailing list