crouton icon indicating copy to clipboard operation
crouton copied to clipboard

Size tests

Open DennisLfromGA opened this issue 8 years ago • 14 comments

Per Issue https://github.com/dnschneid/crouton/issues/2108 - Add destination size tests: If the CHROOTS partition size is less than 4 GB, spit out a warning. If CHROOTS free space is less than 2GB, spit out a warning. Also, determine whether the former is due to a Chrubuntu install.

DennisLfromGA avatar Nov 15 '15 20:11 DennisLfromGA

Thanks for the patch!! Catching up on reviewing things now :)

dnschneid avatar Dec 29 '15 23:12 dnschneid

Thanks for the patch!! Catching up on reviewing things now :)

Thank you for all the help and time out of your busy schedule. :)

DennisLfromGA avatar Dec 30 '15 05:12 DennisLfromGA

I apologize for all the misstarts ( I'm trying, very trying ;).

DennisLfromGA avatar Jan 02 '16 21:01 DennisLfromGA

You're doing great!

dnschneid avatar Jan 04 '16 19:01 dnschneid

You're doing great!

Well I certanly don't think so, it's down right embarrassking!

DennisLfromGA avatar Jan 05 '16 22:01 DennisLfromGA

I was thinking of changing some of my calculations to use decimals.

The current ones are similar to:

local size_gb="$((${size}/1000))GB"

When size is 19588, it yields '19GB'


I'd like to change them to:

local size_gb="$(echo "$size 1000" | awk '{printf "%.2f\n", $1/$2}') GB"

When size is 19588, it yields '19.58 GB'

I wanted to check with y'all and see if that's something worthwhile doing ???

DennisLfromGA avatar Feb 03 '16 22:02 DennisLfromGA

I would just round to 20GB It's not like you can buy a 19.58GB storage device ?? ;)

tedm avatar Feb 04 '16 04:02 tedm

Okay, thanx. I'll leave them as is then probably.

DennisLfromGA avatar Feb 04 '16 16:02 DennisLfromGA

If you want it to round up you can do something like: local size_gb="$(((${size}+500)/1000))GB"

I'm not sure which is preferable...

dnschneid avatar Feb 05 '16 00:02 dnschneid

You could also consider using "df -mh" which will give you the size in 'human' readable format, such as 20GB.

zxvv avatar Apr 06 '16 19:04 zxvv

Yup, thought about that but it's just a little harder to test sizes when in a 'human' readable format. I'm happy with the way it is now unless we want to add the 'echo_color' attributes before it's merged.

DennisLfromGA avatar Apr 06 '16 20:04 DennisLfromGA

I think this is ready to go but you might want to review it again, it's been a while.

DennisLfromGA avatar Oct 25 '16 19:10 DennisLfromGA

@DennisLfromGA Let me know if you want me to test. During some wild attempts to get my Chromebook (Toshiba 2 2015) to run android apps, I lost Crouton, so have to reinstall, probably this weekend.

tedm avatar Oct 25 '16 19:10 tedm

@tedm, Go for it and let us know, thanx.

DennisLfromGA avatar Oct 25 '16 19:10 DennisLfromGA