Cleaning out rcfs/ckrm related operations in a backward compatible manner.
[bootmanager.git] / source / steps / InstallInit.py
index aa76186..eb2c18f 100644 (file)
@@ -59,7 +59,6 @@ def Run( vars, log ):
     SYSIMG_DIR        the directory name of the system image
                       contained in TEMP_PATH
     PLCONF_DIR        The directory to store the configuration file in
-    ALPINA_SERVER_DIR The dir on the server where the support files are
     
     Sets the following variables:
     SYSIMG_PATH    the directory where the system image will be mounted,
@@ -82,10 +81,6 @@ def Run( vars, log ):
         if PLCONF_DIR == "":
             raise ValueError, "PLCONF_DIR"
 
-        ALPINA_SERVER_DIR= vars["ALPINA_SERVER_DIR"]
-        if ALPINA_SERVER_DIR == "":
-            raise ValueError, "ALPINA_SERVER_DIR"
-
     except KeyError, var:
         raise BootManagerException, "Missing variable in vars: %s\n" % var
     except ValueError, var:
@@ -96,7 +91,14 @@ def Run( vars, log ):
     # so who knows what the current state is
 
     log.write( "Unmounting any previous mounts\n" )
-    utils.sysexec_noerr( "chroot %s umount /rcfs" % SYSIMG_PATH, log )
+
+    try:
+        # backwards compat, though, we should never hit this case post PL 3.2
+        os.stat("%s/rcfs/taskclass"%SYSIMG_PATH)
+        utils.sysexec_noerr( "chroot %s umount /rcfs" % SYSIMG_PATH, log )
+    except OSError, e:
+        pass
+
     utils.sysexec_noerr( "umount %s/proc" % SYSIMG_PATH, log )
     utils.sysexec_noerr( "umount %s/mnt/cdrom" % SYSIMG_PATH, log )
     utils.sysexec_noerr( "umount %s/vservers" % SYSIMG_PATH, log )