usr/lib/byobu/ip_address

This commit is contained in:
Dustin Kirkland 2010-06-24 11:13:28 -05:00
commit db5339ec8b
2 changed files with 5 additions and 2 deletions

1
debian/changelog vendored
View file

@ -3,6 +3,7 @@ byobu (2.81) unreleased; urgency=low
* Save some forks:
- usr/bin/byobu-status
- usr/lib/byobu/custom
- usr/lib/byobu/ip_address
- usr/lib/byobu/release
- usr/lib/services
- usr/bin/byobu-status-detail

View file

@ -21,7 +21,7 @@ PKG="byobu"
color 2>/dev/null || color() { true; }
if [ "$1" = "--detail" ]; then
LC_ALL=C /sbin/ifconfig | grep "inet addr" | sed -e 's/^\s*//' -e 's/\s*$//'
/sbin/ifconfig
exit 0
fi
@ -36,6 +36,8 @@ else
interface=`tail -n1 /proc/net/route | awk '{print $1}'`
fi
ipaddr=`LC_ALL=C /sbin/ifconfig "$interface" | grep "inet addr:" | sed -e "s/^.*inet addr://" -e "s/ .*$//"`
ipaddr=$(LC_ALL=C /sbin/ifconfig "$interface")
ipaddr=${ipaddr#* inet addr:}
ipaddr=${ipaddr%% *}
printf "%s$(color bold2)%s$(color -)" "$space" "$ipaddr"