mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
* usr/lib/byobu/include/shutil: LP: #930656
- support network interface detection on Mac OSX - untested by me, but sort of suggested by a user
This commit is contained in:
parent
5cd040cc0b
commit
53b480a657
2 changed files with 9 additions and 1 deletions
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -10,6 +10,9 @@ byobu (5.13) unreleased; urgency=low
|
|||
usr/share/man/man1/byobu.1: LP: #929907
|
||||
- disable the ec2_cost plugin if not running in EC2,
|
||||
allow override with EC2_ESTIMATE=1 in ~/.byobu/statusrc
|
||||
* usr/lib/byobu/include/shutil: LP: #930656
|
||||
- support network interface detection on Mac OSX
|
||||
- untested by me, but sort of suggested by a user
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 16 Feb 2012 23:58:36 -0600
|
||||
|
||||
|
|
|
@ -292,13 +292,18 @@ get_now() {
|
|||
|
||||
get_network_interface() {
|
||||
if [ -n "$MONITORED_NETWORK" ]; then
|
||||
# Manual override
|
||||
_RET="$MONITORED_NETWORK"
|
||||
else
|
||||
elif [ -d /proc ]; then
|
||||
# Linux systems, read route and interface from procfs
|
||||
local Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT
|
||||
while read Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT; do
|
||||
[ "$Mask" = "00000000" ] && break
|
||||
done < /proc/net/route
|
||||
_RET="$Iface"
|
||||
else
|
||||
# Mac OSX, shell out to the route command
|
||||
_RET=$(/sbin/route get default|grep interface:|awk '{print $2}')
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue