mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
* usr/lib/byobu/ip_address:
- remove some first-launch noise, when ip address is not yet available
This commit is contained in:
parent
9f3802ae19
commit
39af487e52
2 changed files with 4 additions and 2 deletions
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -14,6 +14,8 @@ byobu (4.48) unreleased; urgency=low
|
|||
usr/share/doc/byobu/help.tmux.txt:
|
||||
- add a keybinding, Ctrl-Shift-F3/F4, to move a window right
|
||||
or left in the list
|
||||
* usr/lib/byobu/ip_address:
|
||||
- remove some first-launch noise, when ip address is not yet available
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 09 Nov 2011 17:54:11 -0600
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ __ip_address() {
|
|||
if [ "$IP_EXTERNAL" = "1" ]; then
|
||||
ipaddr=$(wget -O- -q http://v6.ipv6-test.com/api/myip.php)
|
||||
else
|
||||
ipaddr=$(LC_ALL=C /sbin/ip -6 addr list dev "$interface" scope global)
|
||||
ipaddr=$(LC_ALL=C /sbin/ip -6 addr list dev "$interface" scope global 2>/dev/null)
|
||||
# Print 'None' if we have no global address
|
||||
[ -z "$ipaddr" ] && ipaddr="None"
|
||||
ipaddr=${ipaddr#* inet6 }
|
||||
|
@ -55,7 +55,7 @@ __ip_address() {
|
|||
# We're in EC2, so get our public IP address
|
||||
ipaddr=$(wget -q -O- http://169.254.169.254/latest/meta-data/public-ipv4)
|
||||
else
|
||||
ipaddr=$(LC_ALL=C /sbin/ip -4 addr list dev "$interface" scope global)
|
||||
ipaddr=$(LC_ALL=C /sbin/ip -4 addr list dev "$interface" scope global 2>/dev/null)
|
||||
ipaddr=${ipaddr#* inet }
|
||||
ipaddr=${ipaddr%%/*}
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue