usr/lib/byobu/ip_address: look for the ip address on global scope,

helps with labeled and tagged interfaces, LP: #685748
This commit is contained in:
Dustin Kirkland 2010-12-07 22:05:03 -06:00
commit be075c6361
2 changed files with 5 additions and 3 deletions

4
debian/changelog vendored
View file

@ -7,8 +7,10 @@ byobu (3.15) unreleased; urgency=low
usr/share/byobu/keybindings/screen-escape-keys,
usr/share/man/man1/byobu.1: add some keybindings for better handling
of screen splits, LP: #686847
* usr/lib/byobu/ip_address: look for the ip address on global scope,
helps with labeled and tagged interfaces, LP: #685748
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 07 Dec 2010 21:19:19 -0600
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 07 Dec 2010 21:55:52 -0600
byobu (3.14-0ubuntu1) natty; urgency=low

View file

@ -44,14 +44,14 @@ fi
case "$IPV6" in
1|true|yes)
ipaddr=$(LC_ALL=C /sbin/ip -6 addr list dev "$interface")
ipaddr=$(LC_ALL=C /sbin/ip -6 addr list dev "$interface" scope global)
# Print 'None' if we have no global address
[ -z "$ipaddr" ] && ipaddr="None"
ipaddr=${ipaddr#* inet6 }
ipaddr=${ipaddr%%/*}
;;
*)
ipaddr=$(LC_ALL=C /sbin/ip -4 addr list dev "$interface")
ipaddr=$(LC_ALL=C /sbin/ip -4 addr list dev "$interface" scope global)
ipaddr=${ipaddr#* inet }
ipaddr=${ipaddr%%/*}
;;