smarter modules.update, was missing onelab-specific modules
[build.git] / vbuild-init-vserver.sh
index 04cc3d4..31514cb 100755 (executable)
@@ -1,5 +1,6 @@
 #!/bin/bash
 # -*-shell-*-
+# $Id$
 
 COMMAND=$(basename $0)
 DIRNAME=$(dirname $0)
@@ -201,9 +202,12 @@ function devel_or_vtest_tools () {
     fi
     pkgsfile=$(pl_locateDistroFile $DIRNAME $pldistro $pkgsname)
 
-    # install individual packages, then groups
-    packages=$(pl_getPackages $fcdistro $pldistro $pkgsfile)
-    groups=$(pl_getGroups $fcdistro $pldistro $pkgsfile)
+    ### install individual packages, then groups
+    # get target arch - use uname -i here (we want either x86_64 or i386)
+    vserver_arch=$($personality vserver $vserver exec uname -i)
+    
+    packages=$(pl_getPackages -a $vserver_arch $fcdistro $pldistro $pkgsfile)
+    groups=$(pl_getGroups -a $vserver_arch $fcdistro $pldistro $pkgsfile)
 
     [ -n "$packages" ] && $personality vserver $vserver exec yum -y install $packages
     [ -n "$groups" ] && $personality vserver $vserver exec yum -y groupinstall $groups
@@ -218,7 +222,7 @@ function post_install () {
     fi
     # setup localtime from the host
     vserver=$1; shift 
-    cp /etc/localtime /vserver/$vserver/etc/localtime
+    cp /etc/localtime /vservers/$vserver/etc/localtime
 }
 
 function post_install_vbuild () {
@@ -295,6 +299,9 @@ function post_install_myplc  () {
     # create symlink for /dev/fd
     [ ! -e "/dev/fd" ] && ln -s /proc/self/fd /dev/fd
 
+    # turn off regular crond, as plc invokes plc_crond
+    chkconfig crond off
+
     # customize root's prompt
     cat << PROFILE > /root/.profile
 export PS1="[$vserver] \\w # "