root / trunk / shell / compute-node-model-finish-up
Historique | Voir | Annoter | Télécharger (10,61 ko)
| 1 | 42 | storres | #! /bin/bash -x |
|---|---|---|---|
| 2 | 42 | storres | # |
| 3 | 42 | storres | # ST - 2012-05-25 |
| 4 | 42 | storres | # |
| 5 | 43 | storres | # Finish up the compute node model installation. |
| 6 | 45 | storres | # Prerequisite: the system must be mounted. |
| 7 | 42 | storres | # |
| 8 | 42 | storres | # Get the directory of the script. |
| 9 | 42 | storres | SCRIPT_PATH=`dirname $0` |
| 10 | 42 | storres | # Get the script name. |
| 11 | 42 | storres | SCRIPT_NAME=`basename $0` |
| 12 | 42 | storres | # Source the common configuration variables. |
| 13 | 42 | storres | . $SCRIPT_PATH/c-i-a-b.common |
| 14 | 42 | storres | |
| 15 | 45 | storres | CURRENT_HOST_NAME=$COMPUTE_NODE_MODEL_HOST_NAME |
| 16 | 42 | storres | # |
| 17 | 42 | storres | # Get the cluster MAC address |
| 18 | 42 | storres | # |
| 19 | 42 | storres | CURRENT_PATH=/etc |
| 20 | 43 | storres | COMPUTE_NODE_MODEL_CLUSTER_MAC_ADDRESS=\ |
| 21 | 50 | storres | `awk -F, -v INDEX=$CONST_COMPUTE_NODE_MODEL_CLUSTER_STATIC_NETWORK_POSTFIX '{if (FNR==INDEX) {print $1}}' $SCRIPT_PATH/$CONST_TEMPLATES_DIR$CURRENT_PATH/$CONST_DHCP_HOSTS_FILE_BASENAME`
|
| 22 | 42 | storres | # |
| 23 | 42 | storres | # |
| 24 | 42 | storres | # Create the Xen configuration file from a template |
| 25 | 42 | storres | # |
| 26 | 42 | storres | CURRENT_PATH=/etc/xen |
| 27 | 50 | storres | cp ${CONST_TEMPLATES_DIR}$CURRENT_PATH/$CONST_COMPUTE_NODE_MODEL_XEN_TEMPLATE_NAME \
|
| 28 | 42 | storres | $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg |
| 29 | 45 | storres | rpl -q Template Configuration $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg |
| 30 | 45 | storres | rpl -q __COMPUTE_NODE_KERNEL__ "$COMPUTE_NODE_KERNEL" \ |
| 31 | 42 | storres | $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg |
| 32 | 45 | storres | rpl -q __COMPUTE_NODE_RAMDISK__ "$COMPUTE_NODE_RAMDISK" \ |
| 33 | 42 | storres | $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg |
| 34 | 45 | storres | rpl -q __COMPUTE_NODE_MODEL_VCPUS_NUM__ "$COMPUTE_NODE_MODEL_VCPUS_NUM" \ |
| 35 | 42 | storres | $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg |
| 36 | 43 | storres | CPUS_LIST=$COMPUTE_NODE_MODEL_CPUS_LIST |
| 37 | 42 | storres | CPUS="" |
| 38 | 42 | storres | for i in $CPUS_LIST |
| 39 | 42 | storres | do |
| 40 | 42 | storres | if [ "x$CPUS" == "x" ] |
| 41 | 42 | storres | then |
| 42 | 42 | storres | CPUS=$i |
| 43 | 42 | storres | else |
| 44 | 42 | storres | CPUS="$CPUS,$i" |
| 45 | 42 | storres | fi |
| 46 | 42 | storres | done |
| 47 | 45 | storres | rpl -q __COMPUTE_NODE_MODEL_CPUS__ "$CPUS" \ |
| 48 | 42 | storres | $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg |
| 49 | 42 | storres | # Memory |
| 50 | 45 | storres | rpl -q __COMPUTE_NODE_MEMORY__ "$COMPUTE_NODE_MEMORY" \ |
| 51 | 42 | storres | $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg |
| 52 | 42 | storres | # Root device |
| 53 | 45 | storres | rpl -q __XEN_SYSTEM_DISK_ROOT_DEVICE_STANZA__ "$CONST_XEN_SYSTEM_DISK_ROOT_DEVICE_STANZA" \ |
| 54 | 42 | storres | $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg |
| 55 | 42 | storres | # |
| 56 | 42 | storres | # System disk stuff |
| 57 | 45 | storres | COMPUTE_NODE_MODEL_SYSTEM_DISK_STANZA="'phy:${COMPUTE_NODE_MODEL_SYSTEM_VOLUME_GROUP_DEVICE}/${COMPUTE_NODE_MODEL_SYSTEM_DISK},$COMPUTE_NODE_SYSTEM_VIRTUAL_VOLUME,w'"
|
| 58 | 45 | storres | rpl -q __COMPUTE_NODE_MODEL_SYSTEM_DISK_STANZA__ "$COMPUTE_NODE_MODEL_SYSTEM_DISK_STANZA" \ |
| 59 | 42 | storres | $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg |
| 60 | 43 | storres | # No home disk stuff: home is network mounted. |
| 61 | 43 | storres | # |
| 62 | 42 | storres | # Swap disk stuff. |
| 63 | 45 | storres | if [ "x$COMPUTE_NODE_MODEL_SWAP_DISK_SIZE" != "x$CONST_NULL_DISK_SIZE" ] ; then |
| 64 | 45 | storres | COMPUTE_NODE_MODEL_SWAP_DISK_STANZA="'phy:${COMPUTE_NODE_SWAP_DISK_VOLUME_GROUP_DEVICE}/${COMPUTE_NODE_MODEL_SWAP_DISK},$COMPUTE_NODE_SWAP_VIRTUAL_VOLUME,w'"
|
| 65 | 45 | storres | rpl -q __COMPUTE_NODE_MODEL_SWAP_DISK_STANZA__ "$COMPUTE_NODE_MODEL_SWAP_DISK_STANZA" \ |
| 66 | 42 | storres | $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg |
| 67 | 42 | storres | # Comment out the noswap stanza. |
| 68 | 45 | storres | rpl -q __COMPUTE_NODE_MODEL_NOSWAP__ "#$CLUSTER_NOSWAP" \ |
| 69 | 42 | storres | $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg |
| 70 | 42 | storres | else |
| 71 | 45 | storres | rpl -q __COMPUTE_NODE_MODEL_SWAP_DISK_STANZA__ "" \ |
| 72 | 42 | storres | $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg |
| 73 | 45 | storres | rpl -q __COMPUTE_NODE_MODEL_NOSWAP__ "$CLUSTER_NOSWAP" \ |
| 74 | 42 | storres | $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg |
| 75 | 42 | storres | fi |
| 76 | 42 | storres | # |
| 77 | 45 | storres | rpl -q __COMPUTE_NODE_MODEL_HOST_NAME__ "$CURRENT_HOST_NAME" \ |
| 78 | 42 | storres | $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg |
| 79 | 42 | storres | # Vif stuff. |
| 80 | 42 | storres | VIF_STANZA=$CONST_XEN_VIF_STANZA_PREFIX |
| 81 | 45 | storres | EXTERNAL_MAC="${CONST_XEN_MAC_PREFIX}${COMPUTE_NODE_MODEL_EXTERNAL_MAC_ADDRESS}"
|
| 82 | 45 | storres | INTERNAL_MAC="${CONST_XEN_MAC_PREFIX}${COMPUTE_NODE_MODEL_CLUSTER_MAC_ADDRESS}"
|
| 83 | 42 | storres | INTERNAL_BRIDGE="${CONST_XEN_BRIDGE_PREFIX}${CLUSTER_BRIDGE_NAME}"
|
| 84 | 45 | storres | INTERNAL_IP="${CONST_XEN_IP_PREFIX}${COMPUTE_NODE_MODEL_CLUSTER_STATIC_IP}"
|
| 85 | 45 | storres | if [ $CLUSTER_EXTERNAL_ADDRESSES_BY_DHCP -eq 1 ] ; then |
| 86 | 45 | storres | rpl -q __XEN_DHCP_STANZA__ "$CONST_XEN_DHCP_STANZA" \ |
| 87 | 42 | storres | $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg |
| 88 | 42 | storres | VIF_STANZA=${VIF_STANZA}${EXTERNAL_MAC}"','"${INTERNAL_IP}","${INTERNAL_MAC}","${INTERNAL_BRIDGE}${CONST_XEN_VIF_STANZA_POSTFIX}
|
| 89 | 42 | storres | else |
| 90 | 42 | storres | # Comment out the DHCP_STANZA. |
| 91 | 45 | storres | rpl -q __XEN_DHCP_STANZA__ "#$CONST_XEN_DHCP_STANZA" \ |
| 92 | 42 | storres | $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg |
| 93 | 42 | storres | VIF_STANZA=${VIF_STANZA}${EXTERNAL_IP}","${EXTERNAL_MAC}",'"${INTERNAL_IP}","${INTERNAL_MAC},${INTERNAL_BRIDGE}${CONST_XEN_VIF_STANZA_POSTFIX}
|
| 94 | 42 | storres | fi |
| 95 | 42 | storres | # In any case, write the VIF_STANZA |
| 96 | 45 | storres | rpl -q __VIF_STANZA__ "$VIF_STANZA" \ |
| 97 | 42 | storres | $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg |
| 98 | 42 | storres | # Console stuff as extra parameter |
| 99 | 45 | storres | rpl -q __EXTRA_STANZA__ "$CONST_XEN_EXTRA_STANZA" \ |
| 100 | 42 | storres | $CONST_XEN_CONFIG_DIR/$CURRENT_HOST_NAME.cfg |
| 101 | 42 | storres | # End creation of Xen configuration file. |
| 102 | 42 | storres | # |
| 103 | 45 | storres | # Complete installation |
| 104 | 42 | storres | # |
| 105 | 42 | storres | # Modules stuff. |
| 106 | 42 | storres | # |
| 107 | 42 | storres | # Create the directory on the new image, if it does not exit yet. |
| 108 | 45 | storres | if [ ! -d $COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT/lib/modules ] ; then |
| 109 | 45 | storres | mkdir $COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT/lib/modules |
| 110 | 42 | storres | fi |
| 111 | 42 | storres | # |
| 112 | 42 | storres | # Copy the modules |
| 113 | 42 | storres | # |
| 114 | 42 | storres | XEN_MODULES_DIRECTORY=`ls /lib/modules | grep xen ` |
| 115 | 42 | storres | for i in $XEN_MODULES_DIRECTORY ; do |
| 116 | 45 | storres | cp -a /lib/modules/$i $COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT/lib/modules |
| 117 | 42 | storres | done |
| 118 | 42 | storres | # |
| 119 | 42 | storres | # Module stuff done. |
| 120 | 42 | storres | # |
| 121 | 42 | storres | # Generate or configure the specific files from templates |
| 122 | 42 | storres | # |
| 123 | 42 | storres | # Create the /etc directory, if necessary |
| 124 | 45 | storres | if [ ! -d $COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT/etc ] ; then |
| 125 | 45 | storres | mkdir $COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT/etc |
| 126 | 42 | storres | fi |
| 127 | 45 | storres | # |
| 128 | 42 | storres | # Copy the sources list |
| 129 | 45 | storres | # |
| 130 | 45 | storres | if [ ! -d $COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT/etc/apt ] ; then |
| 131 | 45 | storres | mkdir $COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT/etc/apt |
| 132 | 42 | storres | fi |
| 133 | 45 | storres | cp /etc/apt/sources.list $COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT/etc/apt |
| 134 | 42 | storres | |
| 135 | 42 | storres | # /etc/network/interfaces |
| 136 | 42 | storres | # The first interface is DHCP configured. |
| 137 | 45 | storres | # No '/' between $COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT and $CURRENT_PATH |
| 138 | 42 | storres | CURRENT_PATH=/etc/network |
| 139 | 45 | storres | if [ ! -d ${COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH} ] ; then
|
| 140 | 45 | storres | mkdir ${COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}
|
| 141 | 42 | storres | fi |
| 142 | 50 | storres | cp ${CONST_TEMPLATES_DIR}$CURRENT_PATH/$COMPUTE_NODE_MODEL_INTERFACES_TEMPLATE \
|
| 143 | 45 | storres | $COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT$CURRENT_PATH/interfaces |
| 144 | 42 | storres | if [ $CLUSTER_EXTERNAL_ADDRESSES_BY_DHCP -eq 1 ] ; then |
| 145 | 42 | storres | ETH0_STANZA="iface eth0 inet dhcp" |
| 146 | 45 | storres | rpl -q __ETH0_STATIC_OR_DHCP__ "$ETH0_STANZA" \ |
| 147 | 45 | storres | ${COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces
|
| 148 | 45 | storres | rpl -q __ETH0_STATIC_ADDRESS__ "" \ |
| 149 | 45 | storres | ${COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces
|
| 150 | 45 | storres | rpl -q __ETH0_STATIC_NETMASK__ "" \ |
| 151 | 45 | storres | ${COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces
|
| 152 | 45 | storres | rpl -q __ETH0_STATIC_NETWORK__ "" \ |
| 153 | 45 | storres | ${COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces
|
| 154 | 45 | storres | rpl -q __ETH0_STATIC_GATEWAY__ "" \ |
| 155 | 45 | storres | ${COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces
|
| 156 | 45 | storres | rpl -q __ETH0_STATIC_BROADCAST__ "" \ |
| 157 | 45 | storres | ${COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces
|
| 158 | 45 | storres | rpl -q __ETH0_STATIC_NAMESERVERS__ "" \ |
| 159 | 45 | storres | ${COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces
|
| 160 | 45 | storres | rpl -q __ETH0_STATIC_DNS_SEARCH__ "" \ |
| 161 | 45 | storres | ${COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces
|
| 162 | 42 | storres | else |
| 163 | 42 | storres | ETH0_STANZA="iface eth0 inet static" |
| 164 | 45 | storres | rpl -q __ETH0_STATIC_OR_DHCP__ "$ETH0_STANZA" \ |
| 165 | 45 | storres | ${COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces
|
| 166 | 45 | storres | rpl -q __ETH0_STATIC_ADDRESS__ "$COMPUTE_NODE_MODEL_CLUSTER_STATIC_IP" \ |
| 167 | 45 | storres | ${COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces
|
| 168 | 45 | storres | rpl -q __ETH0_STATIC_NETMASK__ "$COMPUTE_NODE_MODEL_EXTERNAL_INTERFACE_STATIC_NETMASK" \ |
| 169 | 45 | storres | ${COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces
|
| 170 | 45 | storres | rpl -q __ETH0_STATIC_NETWORK__ "$COMPUTE_NODE_MODEL_EXTERNAL_INTERFACE_STATIC_NETWORK" \ |
| 171 | 45 | storres | ${COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces
|
| 172 | 45 | storres | rpl -q __ETH0_STATIC_GATEWAY__ "$COMPUTE_NODE_MODEL_EXTERNAL_INTERFACE_STATIC_GATEWAY" \ |
| 173 | 45 | storres | ${COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces
|
| 174 | 45 | storres | rpl -q __ETH0_STATIC_BROADCAST__ "$COMPUTE_NODE_MODEL_EXTERNAL_INTERFACE_STATIC_BROADCAST" \ |
| 175 | 45 | storres | ${COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces
|
| 176 | 45 | storres | rpl -q __ETH0_STATIC_NAMESERVERS__ "$COMPUTE_NODE_MODEL_EXTERNAL_INTERFACE_STATIC_DNS_NAMESERVERS" \ |
| 177 | 45 | storres | ${COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces
|
| 178 | 45 | storres | rpl -q __ETH0_STATIC_DNS_SEARCH__ "$COMPUTE_NODE_MODEL_EXTERNAL_INTERFACE_STATIC_DNS_SEARCH" \ |
| 179 | 45 | storres | ${COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces
|
| 180 | 42 | storres | fi |
| 181 | 42 | storres | # Static address on the cluster interface. |
| 182 | 45 | storres | ADDRESS="${CLUSTER_STATIC_NETWORK_PREFIX}.${CONST_COMPUTE_NODE_MODEL_CLUSTER_STATIC_NETWORK_POSTFIX}"
|
| 183 | 45 | storres | rpl -q __ETH1_STATIC_ADDRESS__ "$ADDRESS" \ |
| 184 | 45 | storres | ${COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces
|
| 185 | 45 | storres | rpl -q __ETH1_STATIC_NETMASK__ "$CLUSTER_STATIC_NETMASK" \ |
| 186 | 45 | storres | ${COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/interfaces
|
| 187 | 42 | storres | |
| 188 | 42 | storres | # /etc/hostname |
| 189 | 42 | storres | CURRENT_PATH=/etc |
| 190 | 45 | storres | echo $COMPUTE_NODE_MODEL_CLUSTER_HOST_NAME > "${COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/hostname"
|
| 191 | 42 | storres | # /etc/hosts. Script generated. |
| 192 | 42 | storres | CURRENT_PATH=/etc |
| 193 | 42 | storres | $SCRIPT_PATH/generate-hosts-file \ |
| 194 | 45 | storres | ${COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/hosts
|
| 195 | 42 | storres | # /etc/resolv.conf |
| 196 | 42 | storres | CURRENT_PATH=/etc |
| 197 | 50 | storres | cp ${CONST_TEMPLATES_DIR}$CURRENT_PATH/resolv.conf \
|
| 198 | 45 | storres | ${COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/resolv.conf
|
| 199 | 45 | storres | rpl -q __CLUSTER_DOMAIN_NAME__ "${CLUSTER_DOMAIN_NAME}." \
|
| 200 | 45 | storres | ${COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/resolv.conf
|
| 201 | 45 | storres | rpl -q __FRONT_END_STATIC_ADDRESS__ "${CLUSTER_STATIC_NETWORK_PREFIX}.${CONST_FRONT_END_CLUSTER_STATIC_NETWORK_POSTFIX}" \
|
| 202 | 45 | storres | ${COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/resolv.conf
|
| 203 | 42 | storres | # |
| 204 | 42 | storres | # /etc/fstab |
| 205 | 42 | storres | # |
| 206 | 42 | storres | CURRENT_PATH=/etc |
| 207 | 50 | storres | cp ${CONST_TEMPLATES_DIR}${CURRENT_PATH}/${COMPUTE_NODE_FSTAB_TEMPLATE} \
|
| 208 | 45 | storres | ${COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/fstab
|
| 209 | 45 | storres | # Compute-Node-Model System Disk Line |
| 210 | 45 | storres | CNMSDL=${COMPUTE_NODE_MODEL_SYSTEM_VIRTUAL_VOLUME_DEVICE}
|
| 211 | 45 | storres | CNMSDL="$CNMSDL / $COMPUTE_NODE_SYSTEM_DISK_FILE_SYSTEM errors=remount-ro 0 1" |
| 212 | 45 | storres | rpl -q __COMPUTE_NODE_SYSTEM_DISK_LINE__ "$CNMSDL" \ |
| 213 | 45 | storres | ${COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/fstab
|
| 214 | 45 | storres | # Compute-Node-Model Home Disk Line. Computer nodes mount the /home |
| 215 | 45 | storres | # on the front-end. |
| 216 | 45 | storres | CNMHDL="${FRONT_END_CLUSTER_HOST_NAME}:/"
|
| 217 | 45 | storres | CNMHDL="$CNMHDL /home $COMPUTE_NODE_HOME_DISK_FILE_SYSTEM defaults 0 0" |
| 218 | 45 | storres | rpl -q __COMPUTE_NODE_HOME_DISK_LINE__ "$CNMHDL" \ |
| 219 | 45 | storres | ${COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/fstab
|
| 220 | 45 | storres | # Compute-Node-Model Swap Disk Line |
| 221 | 45 | storres | if [ "x$COMPUTE_NODE_MODEL_SWAP_DISK_SIZE" != "x$CONST_NULL_DISK_SIZE" ] ; then |
| 222 | 45 | storres | CNMSDL=${COMPUTE_NODE_MODEL_SWAP_VIRTUAL_VOLUME_DEVICE}
|
| 223 | 45 | storres | CNMSDL="$CNMSDL none swap 0 0" |
| 224 | 42 | storres | else |
| 225 | 45 | storres | CNMSDL="" |
| 226 | 42 | storres | fi |
| 227 | 45 | storres | # "rpl -q" since $CNMSDL can be an empty string. |
| 228 | 45 | storres | rpl -q __COMPUTE_NODE_SWAP_DISK_LINE__ "$CNMSDL" \ |
| 229 | 45 | storres | ${COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/fstab
|
| 230 | 42 | storres | # |
| 231 | 42 | storres | # End /etc/fstab stuff. |
| 232 | 42 | storres | # |
| 233 | 42 | storres | # /etc/inittab stuff |
| 234 | 42 | storres | # |
| 235 | 45 | storres | rpl -q tty1 "$CONST_XEN_VIRTUAL_CONSOLE_NAME" \ |
| 236 | 45 | storres | ${COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT}${CURRENT_PATH}/inittab
|
| 237 | 42 | storres | # |
| 238 | 42 | storres | # End /etc/inittab stuff. |
| 239 | 42 | storres | # |
| 240 | 45 | storres | # Umount the compute node model system disk |
| 241 | 42 | storres | # |
| 242 | 45 | storres | umount $COMPUTE_NODE_MODEL_FILE_SYSTEM_MOUNT_POINT |
| 243 | 42 | storres | # |
| 244 | 42 | storres | exit 0 |