I work with a lot of virtual machines. For testing and preproduction set up.
I would like the login promt or header to display the ip address of the machine. That way when I start it up I can see what IP I will be ssh into. Our network works uses a DHCP. So it can change between boot up.
$ cat /etc/issue
Ubuntu 11.04 \n \l
Which comes up as
Ubuntu 11.04 [hostname] tty[x]
I want it to come up as
Ubuntu 11.04 [hostname] tty[x] ip xxx.xxx.xxx.xxx
I was think about writing an init / upstart script. Is there a better way.