* usr/lib/byobu/.shutil:

- fix slow/lag associated with testing for metadata server
This commit is contained in:
Dustin Kirkland 2011-06-27 13:30:27 +00:00
commit b64a1510e6
2 changed files with 10 additions and 1 deletions

2
debian/changelog vendored
View file

@ -32,6 +32,8 @@ byobu (4.14) unreleased; urgency=low
- import constants - import constants
* usr/lib/byobu/date: * usr/lib/byobu/date:
- add trailing whitespace back - add trailing whitespace back
* usr/lib/byobu/.shutil:
- fix slow/lag associated with testing for metadata server
-- 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

View file

@ -105,7 +105,14 @@ readfile() {
} }
metadata_available() { metadata_available() {
wget -q -O- --timeout=1 http://169.254.169.254 # This is really ugly. We need a reliable, fast way of determining
# if a metadata service is available, that does NOT slow down non-ec2
# machines.
if grep -qs "^domain ec2.internal" /etc/resolv.conf; then
wget -q -O- --timeout=1 http://169.254.169.254
else
false
fi
} }
status_freq() { status_freq() {