Megatest

checkspace.sh at [e1b3da08cb]
Login

File example/tests/checkspace/checkspace.sh artifact d63bf48441 part of check-in e1b3da08cb


#!/bin/bash -e
diskpath=$1
spacereq=$2
freespace=`df -k $diskpath | grep $diskpath | awk '{print $4}'`
if [[ $freespace -lt $spacereq ]];then
  echo "ERROR: insufficient space on $diskpath"
  exit 1
else
  echo "There is adequate space on $diskpath"
fi