Skip to content

Instantly share code, notes, and snippets.

@cpswan
Created March 21, 2015 18:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cpswan/88d44d9c40e5f3d5bf88 to your computer and use it in GitHub Desktop.
Save cpswan/88d44d9c40e5f3d5bf88 to your computer and use it in GitHub Desktop.
Show IP address prior to login
#!/bin/sh
if [ "$METHOD" = loopback ]; then
exit 0
fi
# Only run from ifup.
if [ "$MODE" != start ]; then
exit 0
fi
cp /etc/issue-standard /etc/issue
/sbin/ifconfig | grep "inet addr" | grep -v "127.0.0.1" | awk '{ print $2 }' | awk -F: '{ print $2 }' >> /etc/issue
echo "" >> /etc/issue
@cpswan
Copy link
Author

cpswan commented Mar 21, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment