From da481d0d0a641c72fbc98c57711370f3f7309113 Mon Sep 17 00:00:00 2001 From: Mate Lakat Date: Thu, 26 Sep 2013 13:57:02 +0100 Subject: [PATCH] xenapi: display IP and DevStack result on console The devstack setup service can update /etc/issue, displaying the status of the installation and the VM's management IP. With this change, after the devstack service finsihed, the login prompt will look like this: OpenStack VM - Installed by DevStack Management IP: 10.219.3.108 Devstack run: SUCCEEDED DevStackOSDomU login: This helps people to log in to their system. Change-Id: Idd6bbd5faf9ced5618cd3e95191bfc3b89473fa2 --- tools/xen/build_xva.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tools/xen/build_xva.sh b/tools/xen/build_xva.sh index 7272fe2664..958102b29c 100755 --- a/tools/xen/build_xva.sh +++ b/tools/xen/build_xva.sh @@ -119,6 +119,20 @@ script if su -c "/opt/stack/run.sh" $STACK_USER; then touch /var/run/devstack.succeeded fi + + # Update /etc/issue + { + echo "OpenStack VM - Installed by DevStack" + IPADDR=\$(ip -4 address show eth0 | sed -n 's/.*inet \\([0-9\.]\\+\\).*/\1/p') + echo " Management IP: \$IPADDR" + echo -n " Devstack run: " + if [ -e /var/run/devstack.succeeded ]; then + echo "SUCCEEDED" + else + echo "FAILED" + fi + echo "" + } > /etc/issue initctl start hvc0 > /dev/null 2>&1 end script EOF