summaryrefslogtreecommitdiffstats
path: root/share/scripts/debconf
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2017-07-28 11:59:25 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2017-07-28 11:59:25 +0000
commitdb9a03004fdbab62430f83eebaf2ca52a0643b3b (patch)
tree757c5a3e162d10848ba6018d8c85a7e646e10376 /share/scripts/debconf
parentAdding upstream version 20170722. (diff)
downloadopen-infrastructure-compute-tools-db9a03004fdbab62430f83eebaf2ca52a0643b3b.tar.xz
open-infrastructure-compute-tools-db9a03004fdbab62430f83eebaf2ca52a0643b3b.zip
Adding upstream version 20170726.upstream/20170726
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'share/scripts/debconf')
-rwxr-xr-xshare/scripts/debconf39
1 files changed, 21 insertions, 18 deletions
diff --git a/share/scripts/debconf b/share/scripts/debconf
index 6190c31..0b80353 100755
--- a/share/scripts/debconf
+++ b/share/scripts/debconf
@@ -762,7 +762,7 @@ Configure_network ()
fi
# Create /etc/hosts
- case "${NETWORK0_IPV4_METHOD}" in
+ case "${NETWORK1_IPV4_METHOD}" in
none|dhcp)
cat > "${DIRECTORY}/etc/hosts.tmp" << EOF
@@ -782,7 +782,7 @@ EOF
cat > "${DIRECTORY}/etc/hosts.tmp" << EOF
127.0.0.1 localhost
-${NETWORK0_IPV4_ADDRESS} ${NAME}
+${NETWORK1_IPV4_ADDRESS} ${NAME}
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
@@ -929,36 +929,39 @@ Commands ()
# maximum of 15 characters, prefix is 'veth-'
HOSTNAME_SHORT="$(echo ${NAME} | cut -c-8)"
- HOST_INTERFACE_NAME="$(echo ${NETWORK0_VETH:-veth-${HOSTNAME_SHORT}-0})"
+ HOST_INTERFACE_NAME="$(echo ${NETWORK1_VETH:-veth-${HOSTNAME_SHORT}-0})"
sed -i -e "s|^cnt.auto=.*|cnt.auto=${CNT_AUTO}|g" \
-e "s|^cnt.container-server=.*|cnt.container-server=${CNT_CONTAINER_SERVER}|g" \
- -e "s|^cnt.network-bridge=.*|cnt.network-bridge=${HOST_INTERFACE_NAME}:${NETWORK0_BRIDGE:-bridge0}|g" \
+ -e "s|^cnt.network-bridge=.*|cnt.network-bridge=${HOST_INTERFACE_NAME}:${NETWORK1_BRIDGE:-bridge0}|g" \
-e "s|^cnt.overlay=.*|cnt.overlay=${CNT_OVERLAY}|g" \
-e "s|^bind=.*|bind=${BIND}|g" \
-e "s|^bind-ro=.*|bind-ro=${BIND_RO}|g" \
-e "s|^network-veth-extra=.*|network-veth-extra=${HOST_INTERFACE_NAME}:eno1|g" \
"${CONFIG}/${NAME}.conf"
- for NUMBER in $(seq 1 ${NETWORK_NUMBER})
- do
- eval IPV4_METHOD="$`echo NETWORK${NUMBER}_IPV4_METHOD`"
+ if [ "${NETWORK_NUMBER}" -ge 2 ]
+ then
+ for NUMBER in $(seq 2 ${NETWORK_NUMBER})
+ do
+ eval IPV4_METHOD="$`echo NETWORK${NUMBER}_IPV4_METHOD`"
- if [ -z "${IPV4_METHOD}" ]
- then
- continue
- fi
+ if [ -z "${IPV4_METHOD}" ]
+ then
+ continue
+ fi
- eval HOST_INTERFACE_NAME="$`echo NETWORK${NUMBER}_VETH`"
+ eval HOST_INTERFACE_NAME="$`echo NETWORK${NUMBER}_VETH`"
- HOST_INTERFACE_NAME="$(echo ${HOST_INTERFACE_NAME:-veth-${HOSTNAME_SHORT}-${NUMBER}})"
- CONTAINER_INTERFACE_NAME="eno${NUMBER}"
+ HOST_INTERFACE_NAME="$(echo ${HOST_INTERFACE_NAME:-veth-${HOSTNAME_SHORT}-${NUMBER}})"
+ CONTAINER_INTERFACE_NAME="eno${NUMBER}"
- sed -i -e "/^register=.*/ a network-veth-extra=${HOST_INTERFACE_NAME}:${CONTAINER_INTERFACE_NAME}" "${CONFIG}/${NAME}.conf"
+ sed -i -e "/^register=.*/ a network-veth-extra=${HOST_INTERFACE_NAME}:${CONTAINER_INTERFACE_NAME}" "${CONFIG}/${NAME}.conf"
- eval BRIDGE="$`echo NETWORK${NUMBER}_BRIDGE`"
- sed -i -e "/^register=.*/ a cnt.network-bridge=${HOST_INTERFACE_NAME}:${BRIDGE:-bridge${NUMBER}}" "${CONFIG}/${NAME}.conf"
- done
+ eval BRIDGE="$`echo NETWORK${NUMBER}_BRIDGE`"
+ sed -i -e "/^register=.*/ a cnt.network-bridge=${HOST_INTERFACE_NAME}:${BRIDGE:-bridge${NUMBER}}" "${CONFIG}/${NAME}.conf"
+ done
+ fi
# Setting root password
echo root:${ROOT_PASSWORD} | chroot "${DIRECTORY}" chpasswd