cBrandon Community

General Category => Raspberry Pi => Topic started by: branx86 on December 23, 2015, 05:41:36 PM

Title: Display IP address at boot
Post by: branx86 on December 23, 2015, 05:41:36 PM
This script goes in etc/rc.local to show ip address at boot up.

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"
printf "My IP address is %s\n\nRaspbian GNU/Linux\n\n" "$_IP" > /etc/issue
else
  printf "Raspbian GNU/Linux\n\n" > /etc/issue
fi

exit 0