> > 3.  After my config session, Kaffe prints out its command options, like
> > it is being invoked without any arguments.

> Can you look at the start-freenet.sh script and try to determine why?  I
> don't use kaffe.

The following patch removes the kaffe message.

Additionally there is an sanity check to preserve the seednodes.ref file
if the download fails. This happened more than once to me and left me without 
node references at the first occurence.

the diff changes following topics:
        - kaffe help output hidden
        - increase max-memory for kaffe
        - remove freenet.pid after kill
        - do not overwrite seednodes.ref if download gives empty file
        - changed remaining #!/bin/bash to #!/bin/sh

mfg The Bishop

diff -3ur orig/start-freenet.sh patched/start-freenet.sh
--- orig/start-freenet.sh       2002-10-08 19:03:05.000000000 +0200
+++ patched/start-freenet.sh    2002-10-08 22:59:25.000000000 +0200
@@ -52,12 +52,17 @@
   java freenet.node.Main --config
 fi
 
+JAVA_ARGS=""
 # if Sun JDK set -server option as suggested on mailing list
-if java -help | grep "[-]server" >/dev/null ;
+if java -help 2>&1 | grep "[-]server" >/dev/null ;
 then
   JAVA_ARGS="-server"
-else
-  JAVA_ARGS=""
+fi
+
+# if Kaffe set -mx (maximum memory) option to 256MB
+if java -help 2>&1 | grep "kaffe" >/dev/null ;
+then
+  JAVA_ARGS="-mx $((256*1024*1024))"
 fi
 
 java $JAVA_ARGS freenet.node.Main $@ &
diff -3ur orig/stop-freenet.sh patched/stop-freenet.sh
--- orig/stop-freenet.sh        2002-10-08 19:03:05.000000000 +0200
+++ patched/stop-freenet.sh     2002-10-08 22:59:39.000000000 +0200
@@ -1,4 +1,4 @@
 #!/bin/sh
 
 kill `cat freenet.pid`
-
+rm freenet.pid
diff -3ur orig/update.sh patched/update.sh
--- orig/update.sh      2002-10-08 19:03:05.000000000 +0200
+++ patched/update.sh   2002-10-08 23:03:53.000000000 +0200
@@ -1,3 +1,11 @@
-#!/bin/bash
+#!/bin/sh
+
 wget http://freenetproject.org/snapshots/freenet-latest.jar -O freenet.jar
-wget http://hawk.freenetproject.org/~freenet4/seednodes.ref -O seednodes.ref
+wget http://hawk.freenetproject.org/~freenet4/seednodes.ref -O 
seednodes.ref.new
+if [ -s seednodes.ref.new ]
+then
+    mv -v seednodes.ref.new seednodes.ref
+else
+    rm seednodes.ref.new
+    echo "$0: seednodes.ref download failed, keeping old one."
+fi

_______________________________________________
support mailing list
[EMAIL PROTECTED]
http://hawk.freenetproject.org/cgi-bin/mailman/listinfo/support

Reply via email to