From 3a5914faca87afa71e8572a85901f683e89f215a Mon Sep 17 00:00:00 2001 From: r00t Date: Sun, 18 Jan 2015 00:06:51 -0500 Subject: [PATCH] tweak to bashrc --- overlay/etc/bash.bashrc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/overlay/etc/bash.bashrc b/overlay/etc/bash.bashrc index 4956f93..f732f14 100644 --- a/overlay/etc/bash.bashrc +++ b/overlay/etc/bash.bashrc @@ -43,15 +43,21 @@ PS1='[\u@\h \W]\$ ' export HISTTIMEFORMAT="%F %T " export PATH="${PATH}:/sbin:/bin:/usr/sbin" +DEFROUTEIF=$(ip route show | egrep '^default' | awk '{print $5}') + echo echo "===================================" date +if [ -n "${DEFROUTEIF}" ]; +then + echo + echo -n "${DEFROUTEIF} is: " + ifconfig "${DEFROUTEIF}" | egrep 'inet|ether' | grep -v "inet6" | awk '{print $2}' +fi echo -echo "eth0 is:" -ifconfig eth0 | egrep 'inet|ether' | grep -v "inet6" | awk '{print $2}' -echo -echo "tun0 is:" +echo -n "tun0 is:" ifconfig tun0 | grep inet | grep -v "inet6" | awk '{print $2}' +echo echo "http://bdisk.square-r00t.net/" echo "===================================" echo