changeset 217: |
98abb7f50885 |
parent 216: |
aec98998d25e |
child 218: |
f88e8a46080b |
author: |
Richard Westhaver <ellis@rwest.io> |
date: |
Tue, 30 Apr 2024 23:18:48 +0000 |
files: |
check.sh |
description: |
bugfix |
1.1--- a/check.sh Tue Apr 30 23:08:08 2024 +0000
1.2+++ b/check.sh Tue Apr 30 23:18:48 2024 +0000
1.3@@ -17,7 +17,7 @@
1.4 need_cmd head
1.5 need_cmd tail
1.6 host_config_file=host.sxp
1.7- rm $host_config_file
1.8+ rm -f $host_config_file
1.9 check_mem
1.10 check_disk
1.11 check_mod kvm
1.12@@ -352,14 +352,14 @@
1.13
1.14 disk_free () {
1.15 local _disk_free
1.16- _disk_free=$(df -kh . | tail -n1 | awk '{print $4}')
1.17- RETVAL="${_disk_free%?}"
1.18+ _disk_free=$(df . | tail -n1 | awk '{print $4}')
1.19+ RETVAL="${_disk_free}"
1.20 }
1.21
1.22 check_disk () {
1.23 disk_free
1.24 local _disk_free="$RETVAL"
1.25- local _disk_min=32 # in Gigabytes
1.26+ local _disk_min=33554432 # in bytes
1.27 if [ "$_disk_free" -lt "$_disk_min" ]; then
1.28 err "not enough disk space: $_disk_free < $_disk_min"
1.29 fi