1
0
Fork 0

move spacer.sh to Makefile

This commit is contained in:
dtb 2022-05-27 18:05:00 -04:00
parent 3a14292b0e
commit 9656df141b
2 changed files with 8 additions and 8 deletions

View File

@ -146,4 +146,12 @@ PROGRAMS= \
alpine-setup:
apk add $(PROGRAMS)
spacer:
# creates an 8GB empty file in the root dir
# that way when the alarm bells go off you can delete it to save a
# couple minutes before the system really runs out of disk
#
# 512 * 16777216 = 8GB
dd bs=512 count=16777216 </dev/zero >/spacer.bin
.PHONY: all clean cleanlibraries cleanprograms noargvzero stdbool sysexits

View File

@ -1,8 +0,0 @@
#!/bin/sh
# creates an 8GB empty file in the root dir
# that way when the alarm bells go off you can delete it to save a couple
# minutes before the system really runs out of disk
BS=512; COUNT=16777216 # 512 * 16777216 = 8GB
! [ -e /spacer.img ] || return 1 || exit 1
dd bs=$BS count=$COUNT </dev/zero >spacer.img
$SUDO mv ./spacer.img /spacer.img