X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=source%2Fsteps%2FValidateNodeInstall.py;h=845348a17fc73bbc7f26c873f974ac1e206425f3;hb=21ad5ef5cec09027e46212ef52f9cf4aaeab675d;hp=0d1d16561473a6e5a334e1feda721e6167f92b04;hpb=30cbd3c60178e01643ec5100a068ed82c8f38013;p=bootmanager.git diff --git a/source/steps/ValidateNodeInstall.py b/source/steps/ValidateNodeInstall.py index 0d1d165..845348a 100644 --- a/source/steps/ValidateNodeInstall.py +++ b/source/steps/ValidateNodeInstall.py @@ -93,22 +93,26 @@ def Run( vars, log ): except BootManagerException, e: log.write( "BootManagerException during fsck of /root and /vservers : %s\n" % str(e) ) + return -1 try: # then attempt to mount them log.write( "mounting root file system\n" ) utils.sysexec("mount -t ext3 %s %s" % (PARTITIONS["root"],SYSIMG_PATH),log) - + + VSERVERS_PATH = "%s/vservers" % SYSIMG_PATH + utils.makedirs(VSERVERS_PATH) log.write( "mounting vserver partition in root file system\n" ) - utils.sysexec("mount -t ext3 %s %s/vservers" % \ - (PARTITIONS["vservers"], SYSIMG_PATH), log) + utils.sysexec("mount -t ext3 %s %s" % (PARTITIONS["vservers"], VSERVERS_PATH), log) + PROC_PATH = "%s/proc" % SYSIMG_PATH + utils.makedirs(PROC_PATH) log.write( "mounting /proc\n" ) - utils.sysexec( "mount -t proc none %s/proc" % SYSIMG_PATH, log ) + utils.sysexec( "mount -t proc none %s" % PROC_PATH, log ) except BootManagerException, e: log.write( "BootManagerException during mount of /root, /vservers and /proc: %s\n" % str(e) ) - return 0 + return -2 ROOT_MOUNTED= 1 vars['ROOT_MOUNTED']= 1 @@ -122,7 +126,7 @@ def Run( vars, log ): os.stat("%s/boot/initrd-boot" % SYSIMG_PATH) except OSError, e: log.write( "Couldn't locate base kernel (you might be using the stock kernel).\n") - return 0 + return -3 # check if the model specified kernel is installed option = ''