Author: toad
Date: 2006-06-03 14:35:03 +0000 (Sat, 03 Jun 2006)
New Revision: 9025

Modified:
   trunk/freenet/src/freenet/node/updater/NodeUpdater.java
Log:
Another updater fix.

Modified: trunk/freenet/src/freenet/node/updater/NodeUpdater.java
===================================================================
--- trunk/freenet/src/freenet/node/updater/NodeUpdater.java     2006-06-03 
13:46:15 UTC (rev 9024)
+++ trunk/freenet/src/freenet/node/updater/NodeUpdater.java     2006-06-03 
14:35:03 UTC (rev 9025)
@@ -261,7 +261,7 @@
                                if(!fNew.renameTo(fRunning)) {
                                        fRunning.delete();
                                        if(!fNew.renameTo(fRunning)) {
-                                               System.out.println("ERROR 
renaming the file!");
+                                               System.err.println("ERROR 
renaming the file!");
                                                return;
                                        }
                                }
@@ -271,6 +271,7 @@
                                
if(!WrapperManager.isControlledByNativeWrapper()) {
                                        Logger.error(this, "Cannot update 
because not running under wrapper");
                                        System.err.println("Cannot update 
because not running under wrapper");
+                                       return;
                                }

                                try {
@@ -334,19 +335,17 @@
                                        Logger.error(this, "Not able to update 
because of I/O error: "+e, e);
                                        System.err.println("Not able to update 
because of I/O error: "+e);
                                }
-                               
-                               if(node.getNodeStarter()!=null)
-                                       node.getNodeStarter().restart();
-                               else{
-                                       System.out.println("New version has 
been downloaded: please restart your node!");
-                                       node.exit();
-                               }       
-                               
-                               
-                               
+
                        }
+                       if(node.getNodeStarter()!=null) {
+                               System.err.println("Restarting because of 
update");
+                               node.getNodeStarter().restart();
+                               System.err.println("Restart returned!?");
+                       } else{
+                               System.out.println("New version has been 
downloaded: please restart your node!");
+                               node.exit();
+                       }       

-                       
                }catch(Exception e){
                        Logger.error(this, "Error while updating the node : 
"+e);
                        System.out.println("Exception : "+e);


Reply via email to