Merge pull request #153 from noon92/working

Fold filesystem_resize.sh into runonce
This commit is contained in:
noon92 2025-01-07 20:19:07 +02:00 • committed by GitHub
commit e82e9b15cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 0 additions and 29 deletions

View file

@ -1,28 +0,0 @@
#!/bin/bash
# Check if the filesystem has been resized previously
if [ ! -f /etc/.filesystem_resized ]; then
# Perform filesystem resize
resize2fs /dev/mmcblk1p5
resize2fs /dev/mmcblk1p6
echo "Resizing /dev/mmcblk1p7 can take up to 10 minutes, depending on microSD card size and speed."
resize2fs /dev/mmcblk1p7
# Create a marker file indicating filesystem resize has been done
touch /etc/.filesystem_resized
echo "Filesystem resized successfully."
fi
if [ ! -f /etc/.filesystem_swap ]; then
fallocate -l 1G /swapfile
chmod 600 /swapfile
mkswap /swapfile > /dev/null
swapon /swapfile > /dev/null
echo '/swapfile none swap sw 0 0' | tee -a /etc/fstab > /dev/null
touch /etc/.filesystem_swap
echo "Swap successfully."
fi

View file

@ -20,7 +20,6 @@ Proceed?" 14 60
exit 1
fi
fi
# resize filesystem to fill partition
/usr/bin/filesystem_resize.sh