# HG changeset patch # User Richard Westhaver # Date 1714519128 0 # Node ID 98abb7f50885c1046a82efc57e98cdc394e041a1 # Parent aec98998d25e407870f615d108bdf6f2bb39fc81 bugfix diff -r aec98998d25e -r 98abb7f50885 check.sh --- a/check.sh Tue Apr 30 23:08:08 2024 +0000 +++ b/check.sh Tue Apr 30 23:18:48 2024 +0000 @@ -17,7 +17,7 @@ need_cmd head need_cmd tail host_config_file=host.sxp - rm $host_config_file + rm -f $host_config_file check_mem check_disk check_mod kvm @@ -352,14 +352,14 @@ disk_free () { local _disk_free - _disk_free=$(df -kh . | tail -n1 | awk '{print $4}') - RETVAL="${_disk_free%?}" + _disk_free=$(df . | tail -n1 | awk '{print $4}') + RETVAL="${_disk_free}" } check_disk () { disk_free local _disk_free="$RETVAL" - local _disk_min=32 # in Gigabytes + local _disk_min=33554432 # in bytes if [ "$_disk_free" -lt "$_disk_min" ]; then err "not enough disk space: $_disk_free < $_disk_min" fi