From f044f5966ebcb4be21ca4d600f8ab41a120df60f Mon Sep 17 00:00:00 2001 From: Kroese Date: Wed, 19 Apr 2023 04:06:04 +0200 Subject: [PATCH] Write zeroes --- run/disk.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/run/disk.sh b/run/disk.sh index b4b385d..86b9c08 100644 --- a/run/disk.sh +++ b/run/disk.sh @@ -29,7 +29,7 @@ if [ -f "${DATA}" ]; then echo "INFO: Resizing data disk from $OLD_SIZE to $DATA_SIZE bytes.." - if [ "$ALLOCATE" != "Y" ]; then + if [ "$ALLOCATE" = "N" ]; then truncate -s "${DATA_SIZE}" "${DATA}"; @@ -45,7 +45,7 @@ if [ -f "${DATA}" ]; then echo "ERROR: Specify a smaller size or disable preallocation with ALLOCATION=N." && exit 84 fi - if [ "$ALLOCATE" = "F" ]; then + if [ "$ALLOCATE" = "Z" ]; then GB=$(( (REQ + 1073741823)/1073741824 )) echo "INFO: Writing ${GB} GB of zeroes, please wait.." @@ -90,7 +90,7 @@ if [ ! -f "${DATA}" ]; then echo "ERROR: Specify a smaller size or disable preallocation with ALLOCATION=N." && exit 86 fi - if [ "$ALLOCATE" = "F" ]; then + if [ "$ALLOCATE" = "Z" ]; then echo "INFO: Writing ${DISK_SIZE} of zeroes, please wait.."