diff options
author | Sylvain Pineau <sylvain.pineau@canonical.com> | 2020-07-13 13:13:37 +0200 |
---|---|---|
committer | Sylvain Pineau <sylvain.pineau@canonical.com> | 2020-07-13 13:13:37 +0200 |
commit | 34728695c739f9a83b83df4988944370d4d072d2 (patch) | |
tree | d75f73c62aa0968189d985e5c9fccbe06e108786 /bin | |
parent | 11513071a3149a54cf19ba7bb9c401ccf7c3c69b (diff) |
bin:max_diskspace_used: Deleted
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/max_diskspace_used | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/bin/max_diskspace_used b/bin/max_diskspace_used deleted file mode 100755 index cc30d85..0000000 --- a/bin/max_diskspace_used +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -# Verify default partitioning has used the entire local hard disk. -# Please remove any non-local attached storage prior to running this -# test. - -for disk in $@; do - echo "Checking maximum disk space available on : $disk" - - psize=`parted -l | grep $disk | awk '{print $3}'` - - if [ -n "$psize" ] - then - echo "Disk space available : $psize" - - fsizes=`df -B ${psize:(-2)} | grep $disk | awk '{print $2}'` - - if [ -n "$fsizes" ] - then - echo "Disk space used : $fsizes" - - fsize=0 - for i in $fsizes; do - i=`echo $i | grep -oe '[0-9\.]*'` - fsize=$(($fsize + $i)) - done - - psize=`echo $psize | grep -oe '[0-9\.]*'` - pct_difference=`awk "BEGIN{print(($psize - $fsize) / $fsize)}"` - echo "Difference ( > 0.15 fails ) : $pct_difference" - awk "BEGIN{exit($pct_difference > 0.15)}" || exit 1 - fi - fi -done |