mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 22:34:23 -07:00
usr/lib/byobu/ip_address
This commit is contained in:
parent
308c9aa650
commit
db5339ec8b
2 changed files with 5 additions and 2 deletions
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -3,6 +3,7 @@ byobu (2.81) unreleased; urgency=low
|
||||||
* Save some forks:
|
* Save some forks:
|
||||||
- usr/bin/byobu-status
|
- usr/bin/byobu-status
|
||||||
- usr/lib/byobu/custom
|
- usr/lib/byobu/custom
|
||||||
|
- usr/lib/byobu/ip_address
|
||||||
- usr/lib/byobu/release
|
- usr/lib/byobu/release
|
||||||
- usr/lib/services
|
- usr/lib/services
|
||||||
- usr/bin/byobu-status-detail
|
- usr/bin/byobu-status-detail
|
||||||
|
|
|
@ -21,7 +21,7 @@ PKG="byobu"
|
||||||
color 2>/dev/null || color() { true; }
|
color 2>/dev/null || color() { true; }
|
||||||
|
|
||||||
if [ "$1" = "--detail" ]; then
|
if [ "$1" = "--detail" ]; then
|
||||||
LC_ALL=C /sbin/ifconfig | grep "inet addr" | sed -e 's/^\s*//' -e 's/\s*$//'
|
/sbin/ifconfig
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -36,6 +36,8 @@ else
|
||||||
interface=`tail -n1 /proc/net/route | awk '{print $1}'`
|
interface=`tail -n1 /proc/net/route | awk '{print $1}'`
|
||||||
fi
|
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"
|
printf "%s$(color bold2)%s$(color -)" "$space" "$ipaddr"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue