mkswp: btrfs detection prelim

This commit is contained in:
PowerUser64 2022-05-22 08:43:04 -07:00
parent be8915f5f1
commit 9b648b02c0

View file

@ -2,12 +2,18 @@
# Makes a swapfile at /swapfile of a given size (ex: mkswp 4G)
set -e
if [ -d /swap ]; then
SWAPFILE=/swap/swapfile
else
SWAPFILE=/swapfile
fi
if [ "$(stat -f -c %T .)" = "btrfs" ]; then
:
fi
sudo fallocate -l "$1" "$SWAPFILE" &&
sudo chmod 600 "$SWAPFILE"
sudo mkswap "$SWAPFILE" &&