X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=source%2Fsteps%2FInstallWriteConfig.py;h=b6038c974ee8eee64cc03b980af5ea76bc1bcb53;hb=e39528f43a41731eaa04321a9f0160079fced818;hp=f7e164fad55c79c78c01b936c99f0ec92b3adb7a;hpb=d4e6bea456b74aec211e7df9757cfd49a815f2b5;p=bootmanager.git diff --git a/source/steps/InstallWriteConfig.py b/source/steps/InstallWriteConfig.py index f7e164f..b6038c9 100644 --- a/source/steps/InstallWriteConfig.py +++ b/source/steps/InstallWriteConfig.py @@ -47,6 +47,7 @@ import utils from systeminfo import systeminfo import BootAPI +from GetAndUpdateNodeDetails import SMP_OPT def Run( vars, log ): @@ -106,6 +107,8 @@ def Run( vars, log ): if BOOT_CD_VERSION == "": raise ValueError, "BOOT_CD_VERSION" + NODE_MODEL_OPTIONS= vars["NODE_MODEL_OPTIONS"] + except KeyError, var: raise BootManagerException, "Missing variable in vars: %s\n" % var except ValueError, var: @@ -175,7 +178,8 @@ def Run( vars, log ): fstab.write( "none /proc proc defaults 0 0\n" ) fstab.write( "none /dev/shm tmpfs defaults 0 0\n" ) fstab.write( "none /dev/pts devpts defaults 0 0\n" ) - fstab.write( "none /rcfs rcfs defaults 0 0\n" ) + # no longer needed + # fstab.write( "none /rcfs rcfs defaults 0 0\n" ) fstab.close() @@ -226,7 +230,10 @@ def Run( vars, log ): rootdev= file( "%s/%s" % (SYSIMG_PATH,PARTITIONS["mapper-root"]), "w" ) rootdev.close() - initrd= os.readlink( "%s/boot/initrd-boot" % SYSIMG_PATH ) + option = '' + if NODE_MODEL_OPTIONS & SMP_OPT: + option = 'smp' + initrd= os.readlink( "%s/boot/initrd-boot%s" % (SYSIMG_PATH,option) ) kernel_version= initrd.replace("initrd-", "").replace(".img", "") utils.removefile( "%s/boot/%s" % (SYSIMG_PATH, initrd) ) utils.sysexec( "chroot %s mkinitrd /boot/initrd-%s.img %s" % \ @@ -387,7 +394,7 @@ def write_network_configuration( vars, log ): -def write_modprobeconf_file( vars, log ): +def write_modprobeconf_file( vars, log, filename = "/etc/modprobe.conf"): """ write out the system file /etc/modprobe.conf with the current set of modules. @@ -404,6 +411,8 @@ def write_modprobeconf_file( vars, log ): if SYSIMG_PATH == "": raise ValueError, "SYSIMG_PATH" + NODE_MODEL_OPTIONS= vars["NODE_MODEL_OPTIONS"] + except KeyError, var: raise BootManagerException, "Missing variable in vars: %s\n" % var except ValueError, var: @@ -411,7 +420,10 @@ def write_modprobeconf_file( vars, log ): # get the kernel version - initrd= os.readlink( "%s/boot/initrd-boot" % SYSIMG_PATH ) + option = '' + if NODE_MODEL_OPTIONS & SMP_OPT: + option = 'smp' + initrd= os.readlink( "%s/boot/initrd-boot%s" % (SYSIMG_PATH,option) ) kernel_version= initrd.replace("initrd-", "").replace(".img", "") sysinfo= systeminfo() @@ -422,7 +434,7 @@ def write_modprobeconf_file( vars, log ): eth_count= 0 scsi_count= 0 - modulesconf_file= file("%s/etc/modprobe.conf" % SYSIMG_PATH, "w" ) + modulesconf_file= file("%s/%s" % (SYSIMG_PATH,filename), "w" ) for type in sysmods: if type == sysinfo.MODULE_CLASS_SCSI: