Index: create-start-front-end
===================================================================
--- create-start-front-end	(revision 28)
+++ create-start-front-end	(revision 29)
@@ -31,7 +31,7 @@
 mkfs -t $FRONT_END_SYSTEM_DISK_FILE_SYSTEM \
         $FRONT_END_SYSTEM_VOLUME_GROUP_DEVICE/$FRONT_END_SYSTEM_DISK
 # If necessary, create the swap volume for the front end.
-if [ $FRONT_END_SWAP_DISK_SIZE != $CONST_NULL_DISK_SIZE ]; then
+if [ $FRONT_END_SWAP_DISK_SIZE != $CONST_NULL_DISK_SIZE ] ; then
   lvcreate -L $FRONT_END_SWAP_DISK_SIZE \
            -n $FRONT_END_SWAP_DISK \
            $FRONT_END_SWAP_VOLUME_GROUP
@@ -44,18 +44,25 @@
 # Create a File System on the front-end system disk.
 mkfs -t $FRONT_END_HOME_DISK_FILE_SYSTEM \
         $FRONT_END_HOME_VOLUME_GROUP_DEVICE/$FRONT_END_HOME_DISK
-# Mount the system disk to copy all the specific files.
-if [ ! -d $FRONT_END_SYSTEM_DISK_MOUNT_POINT ]; then
-  mkdir $FRONT_END_SYSTEM_DISK_MOUNT_POINT
+# Mount the system disk to install the system.
+if [ ! -d $FRONT_END_FILE_SYSTEM_MOUNT_POINT ]; then
+  mkdir $FRONT_END_FILE_SYSTEM_MOUNT_POINT
 fi
 mount $FRONT_END_SYSTEM_VOLUME_GROUP_DEVICE/$FRONT_END_SYSTEM_DISK \
-      $FRONT_END_SYSTEM_DISK_MOUNT_POINT
+      $FRONT_END_FILE_SYSTEM_MOUNT_POINT
+# Create the directory for the homes
+if [ ! -d "$FRONT_END_FILE_SYSTEM_MOUNT_POINT/home" ]; then
+  mkdir "$FRONT_END_FILE_SYSTEM_MOUNT_POINT/home"
+fi
+mount $FRONT_END_HOME_VOLUME_GROUP_DEVICE/$FRONT_END_HOME_DISK \
+      "$FRONT_END_FILE_SYSTEM_MOUNT_POINT/home"
+
 #
 # Get the cluster MAC address
 #
 CURRENT_PATH=/etc
 FRONT_END_CLUSTER_MAC_ADDRESS=\
-`awk -F, -v INDEX=$FRONT_END_STATIC_NETWORK_POSTFIX '{if (FNR==INDEX) {print $1}}' $SCRIPT_PATH/$TEMPLATES_DIR$CURRENT_PATH/$DHCP_HOSTSFILE_BASENAME`
+`awk -F, -v INDEX=$FRONT_END_STATIC_NETWORK_POSTFIX '{if (FNR==INDEX) {print $1}}' $SCRIPT_PATH/$TEMPLATES_DIR$CURRENT_PATH/$CONST_DHCP_HOSTS_FILE_BASENAME`
 #
 # Create the Xen configuration file from a template
 #
@@ -130,87 +137,86 @@
 rpl __VIF_STANZA__ "$VIF_STANZA" \
    $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
 #
+# Install the system.
+# 
+echo deboostrap --arch `uname -m` stable $FRONT_END_FILE_SYSTEM_MOUNT_POINT
+exit 0
 #
+#
 # Configure the specific files from templates
 #
 # Create the /etc directory, if necessary
-if [ ! -d $FRONT_END_SYSTEM_DISK_MOUNT_POINT/etc ] ; then
-  mkdir $FRONT_END_SYSTEM_DISK_MOUNT_POINT/etc
+if [ ! -d $FRONT_END_FILE_SYSTEM_MOUNT_POINT/etc ] ; then
+  mkdir $FRONT_END_FILE_SYSTEM_MOUNT_POINT/etc
 fi
 # /etc/network/interfaces
 # The first interface is DHCP configured.
-# No '/' between $FRONT_END_SYSTEM_DISK_MOUNT_POINT and $CURRENT_PATH
+# No '/' between $FRONT_END_FILE_SYSTEM_MOUNT_POINT and $CURRENT_PATH
 CURRENT_PATH=/etc/network
-if [ ! -d ${FRONT_END_SYSTEM_DISK_MOUNT_POINT}${CURRENT_PATH} ] ; then
-  mkdir ${FRONT_END_SYSTEM_DISK_MOUNT_POINT}${CURRENT_PATH}
+if [ ! -d ${FRONT_END_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH} ] ; then
+  mkdir ${FRONT_END_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}
 fi
 cp templates$CURRENT_PATH/$FRONT_END_INTERFACES_TEMPLATE \
-   $FRONT_END_SYSTEM_DISK_MOUNT_POINT$CURRENT_PATH/interfaces
+   $FRONT_END_FILE_SYSTEM_MOUNT_POINT$CURRENT_PATH/interfaces
 if [ $CLUSTER_EXTERNAL_ADDRESSES_BY_DHCP -eq 1 ] ; then
   ETH0_STANZA="iface eth0 inet dhcp"
   rpl __ETH0_STATIC_OR_DHCP__ "$ETH0_STANZA"  \
-      ${FRONT_END_SYSTEM_DISK_MOUNT_POINT}${CURRENT_PATH}/interfaces
+      ${FRONT_END_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces
   echo y | rpl __ETH0_STATIC_ADDRESS__ "" \
-      ${FRONT_END_SYSTEM_DISK_MOUNT_POINT}${CURRENT_PATH}/interfaces
+      ${FRONT_END_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces
   echo y | rpl __ETH0_STATIC_NETMASK__ "" \
-      ${FRONT_END_SYSTEM_DISK_MOUNT_POINT}${CURRENT_PATH}/interfaces
+      ${FRONT_END_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces
   echo y | rpl __ETH0_STATIC_NETWORK__ "" \
-      ${FRONT_END_SYSTEM_DISK_MOUNT_POINT}${CURRENT_PATH}/interfaces
+      ${FRONT_END_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces
   echo y | rpl __ETH0_STATIC_GATEWAY__ "" \
-      ${FRONT_END_SYSTEM_DISK_MOUNT_POINT}${CURRENT_PATH}/interfaces
+      ${FRONT_END_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces
   echo y | rpl __ETH0_STATIC_BROADCAST__ "" \
-      ${FRONT_END_SYSTEM_DISK_MOUNT_POINT}${CURRENT_PATH}/interfaces
+      ${FRONT_END_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces
   echo y | rpl __ETH0_STATIC_NAMESERVERS__ "" \
-      ${FRONT_END_SYSTEM_DISK_MOUNT_POINT}${CURRENT_PATH}/interfaces
+      ${FRONT_END_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces
   echo y | rpl __ETH0_STATIC_DNS_SEARCH__ "" \
-      ${FRONT_END_SYSTEM_DISK_MOUNT_POINT}${CURRENT_PATH}/interfaces
+      ${FRONT_END_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces
 else
   ETH0_STANZA="iface eth0 inet static"
   rpl __ETH0_STATIC_OR_DHCP__ "$ETH0_STANZA"  \
-      ${FRONT_END_SYSTEM_DISK_MOUNT_POINT}${CURRENT_PATH}/interfaces 
+      ${FRONT_END_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces 
   echo y | rpl __ETH0_STATIC_ADDRESS__ "$FRONT_END_CLUSTER_STATIC_IP" \
-      ${FRONT_END_SYSTEM_DISK_MOUNT_POINT}${CURRENT_PATH}/interfaces 
+      ${FRONT_END_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces 
   echo y | rpl __ETH0_STATIC_NETMASK__ "$FRONT_END_EXTERNAL_INTERFACE_STATIC_NETMASK" \
-      ${FRONT_END_SYSTEM_DISK_MOUNT_POINT}${CURRENT_PATH}/interfaces 
+      ${FRONT_END_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces 
   echo y | rpl __ETH0_STATIC_NETWORK__ "$FRONT_END_EXTERNAL_INTERFACE_STATIC_NETWORK" \
-      ${FRONT_END_SYSTEM_DISK_MOUNT_POINT}${CURRENT_PATH}/interfaces
+      ${FRONT_END_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces
   echo y | rpl __ETH0_STATIC_GATEWAY__ "$FRONT_END_EXTERNAL_INTERFACE_STATIC_GATEWAY" \
-      ${FRONT_END_SYSTEM_DISK_MOUNT_POINT}${CURRENT_PATH}/interfaces 
+      ${FRONT_END_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces 
   echo y | rpl __ETH0_STATIC_BROADCAST__ "$FRONT_END_EXTERNAL_INTERFACE_STATIC_BROADCAST" \
-      ${FRONT_END_SYSTEM_DISK_MOUNT_POINT}${CURRENT_PATH}/interfaces 
+      ${FRONT_END_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces 
   echo y | rpl __ETH0_STATIC_NAMESERVERS__ "$FRONT_END_EXTERNAL_INTERFACE_STATIC_DNS_NAMESERVERS" \
-      ${FRONT_END_SYSTEM_DISK_MOUNT_POINT}${CURRENT_PATH}/interfaces 
+      ${FRONT_END_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces 
   echo y | rpl __ETH0_STATIC_DNS_SEARCH__ "$FRONT_END_EXTERNAL_INTERFACE_STATIC_DNS_SEARCH" \
-      ${FRONT_END_SYSTEM_DISK_MOUNT_POINT}${CURRENT_PATH}/interfaces
+      ${FRONT_END_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces
 fi 
 ADDRESS="$CLUSTER_STATIC_NETWORK_PREFIX.$FRONT_END_STATIC_NETWORK_POSTFIX"
 rpl __ETH1_STATIC_ADDRESS__ $ADDRESS  \
-    ${FRONT_END_SYSTEM_DISK_MOUNT_POINT}${CURRENT_PATH}/interfaces
+    ${FRONT_END_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces
 # /etc/hostname
 CURRENT_PATH=/etc
 echo $CURRENT_HOST_NAME > "${FRONT_END_DISK_MOUNT_POINT}${CURRENT_PATH}/hostname"
-# /etc/hosts
+# /etc/hosts. Script generated.
 CURRENT_PATH=/etc
-CURRENT_HOST_IP="${CLUSTER_STATIC_NETWORK_PREFIX}.${FRONT_END_STATIC_NETWORK_POSTFIX}"
-cp templates$CURRENT_PATH/hosts \
-   ${FRONT_END_SYSTEM_DISK_MOUNT_POINT}${CURRENT_PATH}
-rpl __COMPUTE_NODE_IP__ $CURRENT_HOST_IP \
-    ${FRONT_END_SYSTEM_DISK_MOUNT_POINT}${CURRENT_PATH}/hosts
-rpl __COMPUTE_NODE_NAME__ $CURRENT_HOST_NAME \
-    ${FRONT_END_SYSTEM_DISK_MOUNT_POINT}${CURRENT_PATH}/hosts
+$SCRIPT_PATH/generate-hosts-file \
+  ${FRONT_END_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/hosts
 # /etc/resolv.conf
 CURRENT_PATH=/etc
 cp $TEMPLATES_DIR$CURRENT_PATH/resolv.conf \
-   ${FRONT_END_SYSTEM_DISK_MOUNT_POINT}${CURRENT_PATH}/resolv.conf
+   ${FRONT_END_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/resolv.conf
 rpl __CLUSTER_DOMAIN_NAME__ "${CLUSTER_DOMAIN_NAME}." \
-   ${FRONT_END_SYSTEM_DISK_MOUNT_POINT}${CURRENT_PATH}/resolv.conf
-rpl __FRONT_END_STATIC_ADDRESS__ "${CLUSTER_STATIC_NETWORK_PREFIX}.$FRONT_END_STATIC_NETWORK_POSTFIX" \
-   ${FRONT_END_SYSTEM_DISK_MOUNT_POINT}${CURRENT_PATH}/resolv.conf
-exit 0
+   ${FRONT_END_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/resolv.conf
+rpl __FRONT_END_STATIC_ADDRESS__ "${CLUSTER_STATIC_NETWORK_PREFIX}.${CONST_FRONT_END_CLUSTER_STATIC_NETWORK_POSTFIX}" \
+   ${FRONT_END_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/resolv.conf
 #
 # Umount the compute node system disk
 #
-umount $FRONT_END_SYSTEM_DISK_MOUNT_POINT
+umount $FRONT_END_FILE_SYSTEM_MOUNT_POINT
 #
 # Start the virtual machine
 #
