Drop call to authconfig in generic distribution
[bootmanager.git] / source / steps / InstallWriteConfig.py
index 40d3cbe..a702937 100644 (file)
@@ -1,5 +1,5 @@
 #!/usr/bin/python
-
+#
 # Copyright (c) 2003 Intel Corporation
 # All rights reserved.
 #
@@ -11,7 +11,6 @@ import os, string
 
 from Exceptions import *
 import utils
-import systeminfo
 import BootAPI
 import ModelOptions
 
@@ -72,9 +71,6 @@ def Run( vars, log ):
     utils.sysexec_chroot( SYSIMG_PATH,
         "ln -sf /usr/share/zoneinfo/UTC /etc/localtime", log )
 
-    log.write( "Enabling ntp at boot\n" )
-    utils.sysexec_chroot( SYSIMG_PATH, "chkconfig ntpd on", log )
-
     log.write( "Creating system directory %s\n" % PLCONF_DIR )
     if not utils.makedirs( "%s/%s" % (SYSIMG_PATH,PLCONF_DIR) ):
         log.write( "Unable to create directory\n" )
@@ -84,10 +80,15 @@ def Run( vars, log ):
     fstab= file( "%s/etc/fstab" % SYSIMG_PATH, "w" )
     fstab.write( "%s           none        swap      sw        0 0\n" % \
                  PARTITIONS["mapper-swap"] )
-    fstab.write( "%s           /           ext2      defaults  1 1\n" % \
+    fstab.write( "%s           /           ext3      defaults  1 1\n" % \
                  PARTITIONS["mapper-root"] )
-    fstab.write( "%s           /vservers   ext2      tagxid,defaults  1 2\n" % \
-                 PARTITIONS["mapper-vservers"] )
+    if (vars['ONE_PARTITION']!='1'):
+        if vars['virt'] == 'vs':
+            fstab.write( "%s           /vservers   ext3      tagxid,defaults  1 2\n" % \
+                             PARTITIONS["mapper-vservers"] )
+        else:
+            fstab.write( "%s           /vservers   btrfs     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" )
     fstab.write( "none         /dev/pts    devpts    defaults  0 0\n" )
@@ -100,15 +101,16 @@ def Run( vars, log ):
     issue.write( "http://www.planet-lab.org\n\n" )
     issue.close()
 
-    log.write( "Setting up authentication (non-ssh)\n" )
-    utils.sysexec_chroot( SYSIMG_PATH, "authconfig --nostart --kickstart --enablemd5 " \
-                   "--enableshadow", log )
-    utils.sysexec( "sed -e 's/^root\:\:/root\:*\:/g' " \
-                   "%s/etc/shadow > %s/etc/shadow.new" % \
-                   (SYSIMG_PATH,SYSIMG_PATH), log )
-    utils.sysexec_chroot( SYSIMG_PATH, "mv " \
-                   "/etc/shadow.new /etc/shadow", log )
-    utils.sysexec_chroot( SYSIMG_PATH, "chmod 400 /etc/shadow", log )
+    if (vars['ONE_PARTITION']!='1'):
+        log.write( "Setting up authentication (non-ssh)\n" )
+        utils.sysexec_chroot( SYSIMG_PATH, "authconfig --nostart --kickstart --enablemd5 " \
+                       "--enableshadow", log )
+        utils.sysexec( "sed -e 's/^root\:\:/root\:*\:/g' " \
+                       "%s/etc/shadow > %s/etc/shadow.new" % \
+                       (SYSIMG_PATH,SYSIMG_PATH), log )
+        utils.sysexec_chroot( SYSIMG_PATH, "mv " \
+                       "/etc/shadow.new /etc/shadow", log )
+        utils.sysexec_chroot( SYSIMG_PATH, "chmod 400 /etc/shadow", log )
 
     # if we are setup with dhcp, copy the current /etc/resolv.conf into
     # the system image so we can run programs inside that need network access