Index: configuration-create-compute-nodes
===================================================================
--- configuration-create-compute-nodes	(revision 52)
+++ configuration-create-compute-nodes	(revision 53)
@@ -1,4 +1,4 @@
-#! /bin/bash -x
+#! /bin/bash
 #
 # ST - 2012-07-04
 #
@@ -16,7 +16,6 @@
 #
 CONFIGURATIONS=`ls $SCRIPT_PATH/$CONST_CONFIGURATIONS_DIR`
 CONFIGURATIONS_STRING="{"
-echo $CONFIGURATIONS
 for i in $CONFIGURATIONS ; do
   CONFIGURATIONS_STRING="$CONFIGURATIONS_STRING$i|"
 done
@@ -80,11 +79,12 @@
   #
   CURRENT_HOST_NAME=${COMPUTE_NODE_NAME_PREFIX}${COMPUTE_NODE_INDEX_STRING}
   #
+  echo "Creating $CURRENT_HOST_NAME..."
+  #
   # Get the compute node MAC address on the cluster.
   #
   CURRENT_PATH=/etc
-  COMPUTE_NODE_CLUSTER_MAC_ADDRESS=\
-  `awk -F, -v INDEX=$COMPUTE_NODE_INDEX '{if (FNR==INDEX) {print $1}}' $SCRIPT_PATH/${CONST_TEMPLATES_DIR}$CURRENT_PATH/$CONST_DHCP_HOSTS_FILE_BASENAME`
+  COMPUTE_NODE_CLUSTER_MAC_ADDRESS=`awk -F, -v INDEX=$COMPUTE_NODE_INDEX '{if (FNR==INDEX) {print $1}}' $SCRIPT_PATH/${CONST_TEMPLATES_DIR}$CURRENT_PATH/$CONST_DHCP_HOSTS_FILE_BASENAME`
   #
   # Create the VM system disk (a snapshot of the model disk).
   #
@@ -133,27 +133,27 @@
   CURRENT_PATH=/etc/xen
   cp ${CONST_TEMPLATES_DIR}$CURRENT_PATH/$CONST_COMPUTE_NODE_XEN_TEMPLATE_NAME \
      $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
-  rpl -q Template Configuration $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
+  rpl -q Template Configuration $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg > /dev/null 2>&1
   rpl -q __COMPUTE_NODE_KERNEL__ "$COMPUTE_NODE_KERNEL" \
-     $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
+     $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg  > /dev/null 2>&1
   rpl -q __COMPUTE_NODE_RAMDISK__ "$COMPUTE_NODE_RAMDISK" \
-     $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
+     $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg > /dev/null 2>&1
   rpl -q __COMPUTE_NODE_VCPUS_NUM__ "$COMPUTE_NODE_VCPUS_NUM" \
-     $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
+     $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg > /dev/null 2>&1
   rpl -q __COMPUTE_NODE_CPUS__ "$COMPUTE_NODE_CPUS_LIST" \
-     $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
+     $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg > /dev/null 2>&1
   # Memory
   rpl -q __COMPUTE_NODE_MEMORY__ "$COMPUTE_NODE_MEMORY" \
-     $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
+     $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg > /dev/null 2>&1
   # Root device
   rpl -q __XEN_SYSTEM_DISK_ROOT_DEVICE_STANZA__ "$CONST_XEN_SYSTEM_DISK_ROOT_DEVICE_STANZA" \
-     $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
+     $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg > /dev/null 2>&1
   #
   # System disk stuff
   #
   COMPUTE_NODE_SYSTEM_DISK_STANZA="'phy:${COMPUTE_NODE_MODEL_SYSTEM_VOLUME_GROUP_DEVICE}/${COMPUTE_NODE_SYSTEM_DISK},$COMPUTE_NODE_SYSTEM_VIRTUAL_VOLUME,w'"
   rpl -q __COMPUTE_NODE_SYSTEM_DISK_STANZA__ "$COMPUTE_NODE_SYSTEM_DISK_STANZA" \
-     $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
+     $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg > /dev/null 2>&1
   #
   # No home disk stuff: home is network mounted.
   #
@@ -161,42 +161,42 @@
   if [ "x$COMPUTE_NODE_SWAP_DISK_SIZE" != "x$CONST_NULL_DISK_SIZE" ] ; then
     COMPUTE_NODE_SWAP_DISK_STANZA="'phy:${COMPUTE_NODE_SWAP_DISK_VOLUME_GROUP_DEVICE}/${COMPUTE_NODE_SWAP_DISK},$COMPUTE_NODE_SWAP_VIRTUAL_VOLUME,w'"
     rpl -q __COMPUTE_NODE_SWAP_DISK_STANZA__ "$COMPUTE_NODE_SWAP_DISK_STANZA" \
-       $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
+       $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg > /dev/null 2>&1
     # Comment out the noswap stanza.
     rpl -q __COMPUTE_NODE_NOSWAP__ "#$CLUSTER_NOSWAP" \
-       $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
+       $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg > /dev/null 2>&1
   else # No swap
     rpl -q __COMPUTE_NODE_SWAP_DISK_STANZA__ "" \
-       $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
+       $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg > /dev/null 2>&1
     rpl -q __COMPUTE_NODE_NOSWAP__ "$CLUSTER_NOSWAP" \
-       $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
+       $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg > /dev/null 2>&1
   fi
   #
   rpl -q __COMPUTE_NODE_HOST_NAME__ "$CURRENT_HOST_NAME" \
-     $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
+     $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg > /dev/null 2>&1
   # Vif stuff.
-  COMPUTE_NODE_CLUSTER_STATIC_IP=\
-  `awk -F, -v INDEX=$NODE_NUMBER '{if (FNR==INDEX) {print $3}}' $SCRIPT_PATH/${CONST_TEMPLATES_DIR}/etc/$CONST_DHCP_HOSTS_FILE_BASENAME`
+  
+  COMPUTE_NODE_CLUSTER_STATIC_IP=`awk -F, -v INDEX=$COMPUTE_NODE_INDEX '{if (FNR==INDEX) {print $3}}' $SCRIPT_PATH/${CONST_TEMPLATES_DIR}/etc/$CONST_DHCP_HOSTS_FILE_BASENAME`
   VIF_STANZA=$CONST_XEN_VIF_STANZA_PREFIX
   INTERNAL_MAC="${CONST_XEN_MAC_PREFIX}${COMPUTE_NODE_CLUSTER_MAC_ADDRESS}"
   INTERNAL_BRIDGE="${CONST_XEN_BRIDGE_PREFIX}${CLUSTER_BRIDGE_NAME}"
   INTERNAL_IP="${CONST_XEN_IP_PREFIX}${COMPUTE_NODE_CLUSTER_STATIC_IP}"
   if [ $CLUSTER_INTERNAL_ADDRESSES_BY_DHCP -eq 1 ] ; then
     rpl -q __XEN_DHCP_STANZA__ "$CONST_XEN_DHCP_STANZA" \
-       $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
+       $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg > /dev/null 2>&1
     VIF_STANZA=${VIF_STANZA}${INTERNAL_IP}","${INTERNAL_MAC}","${INTERNAL_BRIDGE}${CONST_XEN_VIF_STANZA_POSTFIX}
   else
     # Comment out the DHCP_STANZA.
     rpl -q __XEN_DHCP_STANZA__ "#$CONST_XEN_DHCP_STANZA" \
-       $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
+       $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg > /dev/null 2>&1
     VIF_STANZA=${VIF_STANZA}${INTERNAL_IP}","${INTERNAL_MAC},${INTERNAL_BRIDGE}${CONST_XEN_VIF_STANZA_POSTFIX}
 fi
   # In any case, write the VIF_STANZA
   rpl -q __VIF_STANZA__ "$VIF_STANZA" \
-     $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
+     $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg > /dev/null 2>&1
   # Console stuff as extra parameter
   rpl -q __EXTRA_STANZA__ "$CONST_XEN_EXTRA_STANZA" \
-     $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg
+     $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg > /dev/null 2>&1
   # End creation of Xen configuration file.
   #
   # Complete installation
@@ -233,9 +233,9 @@
   # Static address on the cluster interface.
   # The DHCP case should be delt with. It involves a template overhaul.
   rpl -q __STATIC_ADDRESS__ "$COMPUTE_NODE_CLUSTER_STATIC_IP" \
-      ${COMPUTE_NODE_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces
+      ${COMPUTE_NODE_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces > /dev/null 2>&1
   rpl -q __STATIC_NETMASK__ "$CLUSTER_STATIC_NETMASK"  \
-      ${COMPUTE_NODE_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces
+      ${COMPUTE_NODE_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces > /dev/null 2>&1
     
   # /etc/hostname
   CURRENT_PATH=/etc
