From 7e5aed8638b2669a6e81f0eafb4edfb7140f6b96 Mon Sep 17 00:00:00 2001 From: wlan0 Date: Tue, 28 Apr 2015 12:10:08 -0700 Subject: [PATCH] Fix #139: show IP address in login screen Following coreos convention, we print all the addresses set on all of the network interfaces Signed-off-by: wlan0 --- scripts/dockerimages/scripts/console.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/dockerimages/scripts/console.sh b/scripts/dockerimages/scripts/console.sh index b4f44c96..1ea72aed 100755 --- a/scripts/dockerimages/scripts/console.sh +++ b/scripts/dockerimages/scripts/console.sh @@ -104,6 +104,8 @@ if ! grep -q "$(hostname)" /etc/hosts; then echo 127.0.1.1 $(hostname) >> /etc/hosts fi +echo $(/sbin/ifconfig | grep -B1 "inet addr" |awk '{ if ( $1 == "inet" ) { print $2 } else if ( $2 == "Link" ) { printf "%s:" ,$1 } }' |awk -F: '{ print $1 ": " $3}') >> /etc/issue + if [ -x /opt/rancher/bin/start.sh ]; then echo Executing custom script /opt/rancher/bin/start.sh || true