diff options
author | Renato Golin <renato.golin@linaro.org> | 2017-09-05 16:37:43 +0100 |
---|---|---|
committer | Renato Golin <renato.golin@linaro.org> | 2017-09-05 16:38:22 +0100 |
commit | 01708a73e6ce673456cf5183aa0f1a7eaee411b7 (patch) | |
tree | 25e5369b18609658052492dd2cd17599eb07a5b1 | |
parent | b404fd52ac265d61d2921cb705bb55f883cfafff (diff) |
allow hard-coded master ip, even on gateway config
Change-Id: If143563da38abc37cb995871ca3ade8e3c9db3ad
-rw-r--r-- | centos7/bash_local | 1 | ||||
-rwxr-xr-x | centos7/input.local | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/centos7/bash_local b/centos7/bash_local index f600097..f1f760b 100644 --- a/centos7/bash_local +++ b/centos7/bash_local @@ -10,6 +10,7 @@ export INTERNAL_ETH=eth1 export INTERNAL_NET=192.168.10.0/24 # Hard-coded slave info, if auto is not appropriate +#export MASTER_IP=192.168.1.1 #export SLAVES_NAMES="node1 node2 node3 node4" #export SLAVES_IPS="192.168.10.10 192.168.10.11 192.168.10.12 192.168.10.13" #export SLAVES_MACS="aa:bb:cc:dd:ee:ff aa:bb:cc:dd:ee:fe aa:bb:cc:dd:ee:fd aa:bb:cc:dd:ee:fc" diff --git a/centos7/input.local b/centos7/input.local index 8ce9904..c5da727 100755 --- a/centos7/input.local +++ b/centos7/input.local @@ -119,7 +119,9 @@ CHROOT=/opt/ohpc/admin/images/centos7.3 sms_name="${MASTER}" # Local (internal) IP address on SMS -if [ "${master_is_gateway}" -eq 1 ]; then +if [ "$MASTER_IP" != "" ]; then + sms_ip="${MASTER_IP}" +elif [ "$INTERNAL_IP" != "" ]; then sms_ip="${INTERNAL_IP}" else sms_ip=$(ip -4 addr list ${INTERNAL_ETH} | grep -o "[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+" | head -1) @@ -178,6 +180,8 @@ else compute_pattern="${compute_pattern}1" fi +echo Master name: ${sms_name} +echo Master IP: ${sms_ip} echo Compute pattern: ${compute_pattern} echo Compute prefix: ${compute_prefix} echo Compute regex: ${compute_regex} |