mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 22:34:23 -07:00
* usr/lib/byobu/ec2_cost, usr/lib/byobu/hostname,
usr/lib/byobu/ip_address: - use wget instead of host to check for metadata
This commit is contained in:
parent
f7a5905384
commit
ce970ecd23
4 changed files with 6 additions and 3 deletions
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -2,6 +2,9 @@ byobu (4.14) unreleased; urgency=low
|
||||||
|
|
||||||
* usr/share/byobu/profiles/tmux:
|
* usr/share/byobu/profiles/tmux:
|
||||||
- getting tmux keybindings much closer!
|
- getting tmux keybindings much closer!
|
||||||
|
* usr/lib/byobu/ec2_cost, usr/lib/byobu/hostname,
|
||||||
|
usr/lib/byobu/ip_address:
|
||||||
|
- use wget instead of host to check for metadata
|
||||||
|
|
||||||
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 16 Jun 2011 16:16:29 -0500
|
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 16 Jun 2011 16:16:29 -0500
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ for arg in $@; do
|
||||||
done
|
done
|
||||||
|
|
||||||
# Try to use metadata service
|
# Try to use metadata service
|
||||||
if host 169.254.169.254 >/dev/null 2>&1; then
|
if wget -q -O- --timeout=1 http://169.254.169.254 >/dev/null 2>&1; then
|
||||||
zone=$(wget -q -O - http://169.254.169.254/latest/meta-data/placement/availability-zone)
|
zone=$(wget -q -O - http://169.254.169.254/latest/meta-data/placement/availability-zone)
|
||||||
. "$BYOBU_PREFIX/share/$PKG/ec2/rates.${zone%?}"
|
. "$BYOBU_PREFIX/share/$PKG/ec2/rates.${zone%?}"
|
||||||
type=$(wget -q -O - http://169.254.169.254/latest/meta-data/instance-type | sed -e "s/\./_/g")
|
type=$(wget -q -O - http://169.254.169.254/latest/meta-data/instance-type | sed -e "s/\./_/g")
|
||||||
|
|
|
@ -26,7 +26,7 @@ if [ "$1" = "--detail" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if host 169.254.169.254 >/dev/null 2>&1; then
|
if wget -q -O- --timeout=1 http://169.254.169.254 2>&1; then
|
||||||
# We're in EC2, so get our public hostname
|
# We're in EC2, so get our public hostname
|
||||||
h=$(wget -q -O - http://169.254.169.254/latest/meta-data/public-hostname)
|
h=$(wget -q -O - http://169.254.169.254/latest/meta-data/public-hostname)
|
||||||
else
|
else
|
||||||
|
|
|
@ -51,7 +51,7 @@ case "$IPV6" in
|
||||||
ipaddr=${ipaddr%%/*}
|
ipaddr=${ipaddr%%/*}
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if host 169.254.169.254 >/dev/null 2>&1; then
|
if wget -q -O- --timeout=1 http://169.254.169.254 >/dev/null 2>&1; then
|
||||||
# We're in EC2, so get our public 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)
|
ipaddr=$(wget -q -O- http://169.254.169.254/latest/meta-data/public-ipv4)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue