%pre # tests to verify that correct disk is used for install # if tests fail, halt installer # Max allowed disk size in GB MAXSIZE=100 # get the size. ask parted for size in GB, grep for 1 or more digits in result SIZE=`parted $disk unit gb print | awk '/^Disk.*GB/ {print \$3}' | sed 's/GB//' | grep '^[0-9][0-9]*\$'` SIZEEXIT=$? if [ "\$SIZEEXIT" -ne "0" ]; then # want to stop install # sleep for a while sleep 3600000 fi if [ "\$SIZE" -gt "\$MAXSIZE" ]; then # want to stop install # sleep for a while sleep 3600001 fi %end