mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 22:34:23 -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
|
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
|
-- 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
|
if [ ! -r "$BYOBU_CONFIG_DIR/$f" ]; then
|
||||||
# Copy from skeleton, if possible
|
# Copy from skeleton, if possible
|
||||||
[ -r "/etc/$PKG/$f" ] && cp -f /etc/$PKG/$f "$BYOBU_CONFIG_DIR/$f"
|
[ -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
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
@ -198,7 +198,7 @@ metadata_available() {
|
||||||
# This is really ugly. We need a reliable, fast way of determining
|
# 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
|
# if a metadata service is available, that does NOT slow down non-ec2
|
||||||
# machines.
|
# 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
|
wget -q -O- --timeout=1 http://169.254.169.254 >/dev/null 2>&1
|
||||||
else
|
else
|
||||||
false
|
false
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue