if i find the guy who thought that was a good idea....
[bootmanager.git] / source / steps / InstallInit.py
index 70aa994..9eb9900 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/python2
+#!/usr/bin/python
 
 # Copyright (c) 2003 Intel Corporation
 # All rights reserved.
@@ -7,11 +7,10 @@
 # All rights reserved.
 # expected /proc/partitions format
 
-import os, sys, shutil
-import string
+import os, sys, string
 
 import utils
-
+from Exceptions import *
 
 def Run( vars, log ):
     """
@@ -71,11 +70,16 @@ def Run( vars, log ):
     utils.sysexec_noerr( "umount %s" % SYSIMG_PATH )
     vars['ROOT_MOUNTED']= 0
 
-    log.write( "Removing any old files, directories\n" )
-    utils.removedir( TEMP_PATH )
+#    log.write( "Removing any old files, directories\n" )
+#    utils.removedir( TEMP_PATH )
     
     log.write( "Cleaning up any existing PlanetLab config files\n" )
-    utils.removedir( PLCONF_DIR )
+    try:
+        flist = os.listdir( PLCONF_DIR)
+        for file in flist:
+            utils.removedir( file )
+    except OSError:
+        pass
     
     # create the temp path and sysimg path. since sysimg
     # path is in temp path, both are created here