mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
* usr/bin/byobu-janitor, usr/lib/byobu/.shutil:
- get ec2 cost automatically working again in ec2 instances
This commit is contained in:
parent
cc12036a07
commit
2fa9ed3401
3 changed files with 7 additions and 2 deletions
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -1,6 +1,7 @@
|
|||
byobu (4.24) unreleased; urgency=low
|
||||
|
||||
* UNRELEASED
|
||||
* usr/bin/byobu-janitor, usr/lib/byobu/.shutil:
|
||||
- get ec2 cost automatically working again in ec2 instances
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 28 Jul 2011 01:17:54 -0500
|
||||
|
||||
|
|
|
@ -58,6 +58,10 @@ for f in status statusrc; do
|
|||
if [ ! -r "$BYOBU_CONFIG_DIR/$f" ]; then
|
||||
# Copy from skeleton, if possible
|
||||
[ -r "/etc/$PKG/$f" ] && cp -f /etc/$PKG/$f "$BYOBU_CONFIG_DIR/$f"
|
||||
if [ "$f" = "status" ] && metadata_available; then
|
||||
# Enable ec2_cost if we're in ec2
|
||||
$SED -i -e "s/ec2_cost=.*/ec2_cost=1/" "$BYOBU_CONFIG_DIR/$f"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
|
|
|
@ -198,7 +198,7 @@ metadata_available() {
|
|||
# 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 [ -e /etc/ec2_version ]; then
|
||||
if [ -e /etc/ec2_version ] || [ -e /usr/sbin/update-grub-legacy-ec2 ]; then
|
||||
wget -q -O- --timeout=1 http://169.254.169.254 >/dev/null 2>&1
|
||||
else
|
||||
false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue