X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=source%2Fsteps%2FInstallWriteConfig.py;h=e272fdb2a7b453ffd77bd761bf6f3a5bc940ebfb;hb=c551da10791c6435130b24e5925c63e288e8b874;hp=2d19d476c6f89bcd9a21efda5b8a466373ac0ca5;hpb=564e963c5c8cff7c2717c2e5c7b5683dc2ed59c9;p=bootmanager.git diff --git a/source/steps/InstallWriteConfig.py b/source/steps/InstallWriteConfig.py index 2d19d47..e272fdb 100644 --- a/source/steps/InstallWriteConfig.py +++ b/source/steps/InstallWriteConfig.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2 +#!/usr/bin/python # Copyright (c) 2003 Intel Corporation # All rights reserved. @@ -32,10 +32,8 @@ def Run( vars, log ): PARTITIONS dictionary of generic part. types (root/swap) and their associated devices. PLCONF_DIR The directory to store the configuration file in - NETWORK_SETTINGS A dictionary of the values from the network + INTERFACE_SETTINGS A dictionary of the values from the network configuration file - BOOT_CD_VERSION A tuple of the current bootcd version - Sets the following variables: None @@ -61,13 +59,9 @@ def Run( vars, log ): if PLCONF_DIR == "": raise ValueError, "PLCONF_DIR" - NETWORK_SETTINGS= vars["NETWORK_SETTINGS"] - if NETWORK_SETTINGS == "": - raise ValueError, "NETWORK_SETTINGS" - - BOOT_CD_VERSION= vars["BOOT_CD_VERSION"] - if BOOT_CD_VERSION == "": - raise ValueError, "BOOT_CD_VERSION" + INTERFACE_SETTINGS= vars["INTERFACE_SETTINGS"] + if INTERFACE_SETTINGS == "": + raise ValueError, "INTERFACE_SETTINGS" except KeyError, var: raise BootManagerException, "Missing variable in vars: %s\n" % var @@ -86,14 +80,13 @@ def Run( vars, log ): log.write( "Unable to create directory\n" ) return 0 - utils.breakpoint("Before fstab"); log.write( "Writing system /etc/fstab\n" ) fstab= file( "%s/etc/fstab" % SYSIMG_PATH, "w" ) fstab.write( "%s none swap sw 0 0\n" % \ PARTITIONS["mapper-swap"] ) - fstab.write( "%s / ext3 defaults 0 0\n" % \ + fstab.write( "%s / ext3 defaults 1 1\n" % \ PARTITIONS["mapper-root"] ) - fstab.write( "%s /vservers ext3 tagxid,defaults 0 0\n" % \ + fstab.write( "%s /vservers ext3 tagxid,defaults 1 2\n" % \ PARTITIONS["mapper-vservers"] ) fstab.write( "none /proc proc defaults 0 0\n" ) fstab.write( "none /dev/shm tmpfs defaults 0 0\n" ) @@ -102,8 +95,6 @@ def Run( vars, log ): # fstab.write( "none /rcfs rcfs defaults 0 0\n" ) fstab.close() - utils.breakpoint("after fstab"); - log.write( "Writing system /etc/issue\n" ) issue= file( "%s/etc/issue" % SYSIMG_PATH, "w" ) issue.write( "PlanetLab Node: \\n\n" ) @@ -125,7 +116,7 @@ def Run( vars, log ): # the system image so we can run programs inside that need network access method= "" try: - method= vars['NETWORK_SETTINGS']['method'] + method= vars['INTERFACE_SETTINGS']['method'] except: pass