Skip to content
Permalink
Browse files

Zerofill empty space

  • Loading branch information...
NEMS Linux
NEMS Linux committed Mar 26, 2019
1 parent 9b168ac commit 68139763477a79f7a119acc090cb5c509120eb3c
Showing with 12 additions and 0 deletions.
  1. +12 −0 nems-cleanup.sh
@@ -274,6 +274,18 @@ nameserver 2001:4860:4860::8844

sync

# Write zeros to unused blocks before halting to create the img
echo "Filling empty space with zeros..."
dd if=/dev/zero bs=1M of=/root/.null && sync
while [ -f /root/.null ]
do
sync
rm -f /root/.null
sync
sleep 5
done


if [[ $1 == "halt" ]]; then echo "Halting..."; halt; exit; fi;

if [[ $1 == "reboot" ]]; then echo "Rebooting..."; reboot; exit; fi;

0 comments on commit 6813976

Please sign in to comment.
You can’t perform that action at this time.