from systeminfo import systeminfo
import BootAPI
+from GetAndUpdateNodeDetails import SMP_OPT
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:
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()
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" % \
-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.
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:
# 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()
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: