I might be in left field but...
in init.d create a script that simply
echo_ip
script contents
#!/bin/bash
ip -4 addr |grep inet |tee /var/log/ip # this will only print the ip
lines and copy to /var/log/ip ( I prefer tee over echo, for a variety of
reasons)
then create S99echo_ip in rc3.d
so that it runs last
then On 12/8/2014 5:35 PM, Florin Andrei wrote:
CentOS 7
How do I print something on the text-mode console right after the OS
has finished booting?
I've a virtual instance and I need to know its IP address after it has
finished booting up, to know where to ssh into it. I've tried adding
"ip -4 addr > /dev/tty0" to rc.local, but that obviously doesn't work,
because the login prompt overwrites everything I do.
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos