From 1ad1dd16a2998be4dfb89d8fd2adb9467933b996 Mon Sep 17 00:00:00 2001 From: Maciej Relewicz Date: Thu, 31 Mar 2016 14:52:42 +0200 Subject: [PATCH] Fix IP address in /etc/issue We should create banner after user configures network via fuelmenu Change-Id: I7d3e14863251e848c04fbeb47fc79e558751b7ad Closes-Bug: #1564366 --- iso/bootstrap_admin_node.sh | 52 ++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/iso/bootstrap_admin_node.sh b/iso/bootstrap_admin_node.sh index 4f9549ee3..387843621 100755 --- a/iso/bootstrap_admin_node.sh +++ b/iso/bootstrap_admin_node.sh @@ -321,32 +321,6 @@ EOF # Generate Fuel UUID [ ! -f "/etc/fuel/fuel-uuid" ] && uuidgen > /etc/fuel/fuel-uuid || : -# Prepare custom /etc/issue logon banner and script for changing IP in it -# We can have several interface naming schemes applied and several interface -# UI will listen on -ipstr="" -NL=$'\n' -for ip in `ip -o -4 a | grep -e "e[nt][hopsx].*" | awk '{print \$4 }' | cut -d/ -f1`; do - ipstr="${ipstr}https://${ip}:8443${NL}" -done -cat > /etc/issue <> /etc/ntp.conf && systemctl restart ntpd # Disabling splash @@ -401,7 +375,6 @@ systemctl start sshd systemctl enable iptables.service systemctl start iptables.service - if [ "$wait_for_external_config" == "yes" ]; then wait_timeout=3000 pidfile=/var/lock/wait_for_external_config @@ -423,6 +396,31 @@ $wait_timeout" rm -f $pidfile fi +# Prepare custom /etc/issue logon banner and script for changing IP in it +# We can have several interface naming schemes applied and several interface +# UI will listen on +ipstr="" +NL=$'\n' +for ip in `ip -o -4 addr show | awk '/e[nt][hopsx]/ { split($4, arr, /\//); print arr[1] }'`; do + ipstr="${ipstr}https://${ip}:8443${NL}" +done +cat > /etc/issue <