diff --git a/debian/changelog b/debian/changelog index be10136c..fc29674e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,11 @@ byobu (5.53) unreleased; urgency=low - * UNRELEASED + * usr/bin/byobu-launch, usr/lib/byobu/ec2_cost, + usr/lib/byobu/hostname, usr/lib/byobu/include/shutil, + usr/lib/byobu/ip_address: LP: #1208853 + - revert this recent commit, as it appears to have some unintended + consequences, and it was just cleaning up some false positive + bashism hits -- Dustin Kirkland Mon, 05 Aug 2013 09:23:03 +0100 diff --git a/usr/bin/byobu-launch b/usr/bin/byobu-launch index 95a41df3..1dda80f2 100755 --- a/usr/bin/byobu-launch +++ b/usr/bin/byobu-launch @@ -63,8 +63,7 @@ elif [ "$BYOBU_SOURCED_PROFILE" != "1" ] && [ "$LC_BYOBU" != "0" ] && [ "$BYOBU_ [ -z "$_byobu_sourced" ] && [ -r "$HOME/.profile" ] && . "$HOME/.profile" if byobu-launcher; then # Wait very briefly for the no-logout flag to get written? - local brief="0.1" - sleep $brief + sleep 0.1 if [ -e "$BYOBU_CONFIG_DIR/no-logout-on-detach" ] || [ -e "$BYOBU_RUN_DIR/no-logout" ]; then # The user does not want to logout on byobu detach rm -f "$BYOBU_RUN_DIR/no-logout" # Remove one-time no-logout flag, if it exists diff --git a/usr/lib/byobu/ec2_cost b/usr/lib/byobu/ec2_cost index ac866d7d..4f7cec87 100755 --- a/usr/lib/byobu/ec2_cost +++ b/usr/lib/byobu/ec2_cost @@ -32,17 +32,17 @@ __ec2_cost_detail() { } __ec2_cost() { - local zone type file_to_stat cpu mem rate hours tx_gb rx_gb network_cost uptime_cost total_cost interface cache="$BYOBU_RUN_DIR/cache.$BYOBU_BACKEND/ec2_cost" brief="0.02" + local zone type file_to_stat cpu mem rate hours tx_gb rx_gb network_cost uptime_cost total_cost interface cache="$BYOBU_RUN_DIR/cache.$BYOBU_BACKEND/ec2_cost" if [ -s "$cache.rate" ]; then read rate < "$cache.rate" elif metadata_available; then # Try to use metadata service [ -s "$cache.zone" ] || wget -q -O- http://169.254.169.254/latest/meta-data/placement/availability-zone "$cache.zone" 2>/dev/null & - sleep $brief + sleep 0.02 [ -s "$cache.zone" ] && read zone < "$cache.zone" zone=${zone%%[a-z]} [ -s "$cache.type" ] || wget -q -O- http://169.254.169.254/latest/meta-data/instance-type "$cache.type" 2>/dev/null & - sleep $brief + sleep 0.02 [ -s "$cache.type" ] && read type < "$cache.type" $BYOBU_PREFIX/lib/byobu/include/ec2instancespricing.py --type ondemand --filter-region $zone --filter-type $type --filter-os-type linux --format csv | tail -n1 > "$cache.rate" read rate < "$cache.rate" diff --git a/usr/lib/byobu/hostname b/usr/lib/byobu/hostname index bb1394f4..73e8381d 100755 --- a/usr/lib/byobu/hostname +++ b/usr/lib/byobu/hostname @@ -24,12 +24,12 @@ __hostname_detail() { } __hostname() { - local h= brief="0.02" + local h= if metadata_available; then local cache="$BYOBU_RUN_DIR/cache.$BYOBU_BACKEND/hostname" # Background a retrieval of our public hostname wget -q -O- http://169.254.169.254/latest/meta-data/public-hostname "$cache" 2>/dev/null & - sleep $brief + sleep 0.02 [ -s "$cache" ] && read h < "$cache" else h=$(hostname -s 2>/dev/null || hostname) diff --git a/usr/lib/byobu/include/shutil b/usr/lib/byobu/include/shutil index 7d5186e0..547f6367 100755 --- a/usr/lib/byobu/include/shutil +++ b/usr/lib/byobu/include/shutil @@ -209,7 +209,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. - local x=0 cache="$BYOBU_CONFIG_DIR/.metadata_available" brief="0.02" + local x=0 cache="$BYOBU_CONFIG_DIR/.metadata_available" # First, check the cache if [ -s "$cache" ]; then # Metadata is non-empty, so we have metadata available @@ -219,7 +219,7 @@ metadata_available() { if [ -e /etc/ec2_version ] || [ -e /usr/sbin/update-grub-legacy-ec2 ]; then # This *looks* like a machine with metadata, so background a potentially slow check wget -q -O- --timeout=10 --tries=1 http://169.254.169.254 "$cache" 2>/dev/null & - sleep $brief + sleep 0.02 [ -s "$cache" ] && x=1 fi fi diff --git a/usr/lib/byobu/ip_address b/usr/lib/byobu/ip_address index 39f2df74..322e7c08 100755 --- a/usr/lib/byobu/ip_address +++ b/usr/lib/byobu/ip_address @@ -28,7 +28,7 @@ __ip_address_detail() { } __ip_address() { - local interface ipaddr cache="$BYOBU_RUN_DIR/cache.$BYOBU_BACKEND/ip_address" brief="0.02" + local interface ipaddr cache="$BYOBU_RUN_DIR/cache.$BYOBU_BACKEND/ip_address" # Allow interface overrides in $BYOBU_CONFIG_DIR/statusrc if [ -n "$MONITORED_NETWORK" ]; then interface="$MONITORED_NETWORK" @@ -43,7 +43,7 @@ __ip_address() { if [ "$IP_EXTERNAL" = "1" ]; then # Background an update wget -q -O- http://v6.ipv6-test.com/api/myip.php "$cache" 2>/dev/null & - sleep $brief + sleep 0.02 else # Background an update if [ -x /sbin/ip ]; then @@ -62,12 +62,12 @@ __ip_address() { *) if [ "$IP_EXTERNAL" = "1" ]; then wget -q -O- http://v4.ipv6-test.com/api/myip.php "$cache" 2>/dev/null & - sleep $brief + sleep 0.02 [ -s "$cache" ] && read ipaddr < "$cache" elif metadata_available; then # We're in EC2, so get our public IP address wget -q -O- http://169.254.169.254/latest/meta-data/public-ipv4 "$cache" 2>/dev/null & - sleep $brief + sleep 0.02 [ -s "$cache" ] && read ipaddr < "$cache" else if [ -x /sbin/ip ]; then