mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 22:34:23 -07:00
usr/share/byobu/ec2/rates.us-east-1, usr/bin/byobu-janitor:
This commit is contained in:
parent
78c62257d6
commit
198f9c5ee3
3 changed files with 7 additions and 4 deletions
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -30,7 +30,7 @@ byobu (4.3) unreleased; urgency=low
|
|||
usr/share/byobu/ec2/rates.eu_ie => usr/share/byobu/ec2/rates.eu-
|
||||
west-1, usr/share/byobu/ec2/rates.us_ca => usr/share/byobu/ec2/us-
|
||||
west-1, usr/share/byobu/ec2/rates.us_va =>
|
||||
usr/share/byobu/ec2/rates.us-east-1:
|
||||
usr/share/byobu/ec2/rates.us-east-1, usr/bin/byobu-janitor:
|
||||
- rework ec2_cost entirely, using metaservice; much more accurate
|
||||
|
||||
[ Scott Moser ]
|
||||
|
|
|
@ -171,5 +171,8 @@ if [ -h "$RUN/$PKG.ssh-agent" ]; then
|
|||
mv -f "$RUN/$PKG.ssh-agent" "$DATA/.ssh-agent"
|
||||
fi
|
||||
|
||||
# Affects: Upgrades from <= byobu 4.3, remove ec2_rates
|
||||
rm -f "$DATA/ec2_rates"
|
||||
|
||||
# Clean up flag
|
||||
rm -f "$FLAG"
|
||||
|
|
|
@ -33,9 +33,9 @@ done
|
|||
|
||||
# Try to use metadata service
|
||||
zone=$(wget -q -O - http://169.254.169.254/latest/meta-data/placement/availability-zone || echo "us-east-1")
|
||||
. "$BYOBU_PREFIX/share/$PKG/ec2/rates.$zone"
|
||||
if type=$(wget -q -O - http://169.254.169.254/latest/meta-data/instance-type); then
|
||||
RATE=$(eval ${type/./_})
|
||||
. "$BYOBU_PREFIX/share/$PKG/ec2/rates.${zone%?}"
|
||||
if type=$(wget -q -O - http://169.254.169.254/latest/meta-data/instance-type | sed -e "s/\./_/g"); then
|
||||
eval RATE="\$$type"
|
||||
else
|
||||
# Count CPUs, Memory, Architecture
|
||||
cpu=$(grep -c "^processor.*:" /proc/cpuinfo) || cpu=1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue