From 28d0e6a530d84f4d252d6ecd896ad3da2d76df15 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Thu, 22 Sep 2011 11:58:03 -0500 Subject: [PATCH] * usr/bin/byobu-janitor, usr/share/byobu/status/status: LP: #856467 - cleaner fix for ensuring ec2_cost is enabled in ec2 instances; previous fix just enabled it everywhere --- debian/changelog | 4 +++- usr/bin/byobu-janitor | 4 ++++ usr/share/byobu/status/status | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index d73bea91..1b722908 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ byobu (4.35) unreleased; urgency=low - * UNRELEASED + * usr/bin/byobu-janitor, usr/share/byobu/status/status: LP: #856467 + - cleaner fix for ensuring ec2_cost is enabled in ec2 instances; + previous fix just enabled it everywhere -- Dustin Kirkland Wed, 21 Sep 2011 18:49:00 -0500 diff --git a/usr/bin/byobu-janitor b/usr/bin/byobu-janitor index 4caa212e..f2bce1d3 100755 --- a/usr/bin/byobu-janitor +++ b/usr/bin/byobu-janitor @@ -59,6 +59,10 @@ for f in status statusrc; do if [ ! -r "$BYOBU_CONFIG_DIR/$f" ]; then # Copy from skeleton, if possible cp -f "$BYOBU_PREFIX/share/$PKG/status/$f" "$BYOBU_CONFIG_DIR/$f" + # Enable ec2_cost, if we're in ec2 and seeding a new setup + if metadata_available; then + $SED -i -e "s/#ec2_cost/ec2_cost/g" "$BYOBU_CONFIG_DIR/$f" + fi fi done diff --git a/usr/share/byobu/status/status b/usr/share/byobu/status/status index d7c05abc..c66f9d74 100644 --- a/usr/share/byobu/status/status +++ b/usr/share/byobu/status/status @@ -26,8 +26,8 @@ screen_upper_left="color" screen_upper_right="color whoami hostname ip_address menu" screen_lower_left="color logo release #arch" -screen_lower_right="color network #disk_io custom raid reboot_required updates_available #apport #services #mail users uptime ec2_cost #rcs_cost #fan_speed #cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap #disk #time_utc date time" +screen_lower_right="color network #disk_io custom raid reboot_required updates_available #apport #services #mail users uptime #ec2_cost #rcs_cost #fan_speed #cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap #disk #time_utc date time" # Tmux has one status line, with 2 halves for status tmux_left="logo release #arch" -tmux_right="network #disk_io custom raid reboot_required updates_available #apport #services #mail users uptime ec2_cost #rcs_cost #fan_speed #cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap #disk #whoami #hostname #ip_address #time_utc date time" +tmux_right="network #disk_io custom raid reboot_required updates_available #apport #services #mail users uptime #ec2_cost #rcs_cost #fan_speed #cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap #disk #whoami #hostname #ip_address #time_utc date time"