mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-10-04 12:05:04 +02:00
just expand FS once when swap is created
This commit is contained in:
@@ -4,7 +4,7 @@ echo ""
|
|||||||
# add bonus scripts
|
# add bonus scripts
|
||||||
./91addBonus.sh
|
./91addBonus.sh
|
||||||
|
|
||||||
###### SWAP
|
###### SWAP & FS
|
||||||
echo "*** SWAP file ***"
|
echo "*** SWAP file ***"
|
||||||
swapExists=$(swapon -s | grep -c /mnt/hdd/swapfile)
|
swapExists=$(swapon -s | grep -c /mnt/hdd/swapfile)
|
||||||
if [ ${swapExists} -eq 1 ]; then
|
if [ ${swapExists} -eq 1 ]; then
|
||||||
@@ -20,6 +20,12 @@ else
|
|||||||
sudo dphys-swapfile setup
|
sudo dphys-swapfile setup
|
||||||
sudo chmod 0600 /mnt/hdd/swapfile
|
sudo chmod 0600 /mnt/hdd/swapfile
|
||||||
sudo dphys-swapfile swapon
|
sudo dphys-swapfile swapon
|
||||||
|
|
||||||
|
# expand FS of SD
|
||||||
|
echo "*** Expand RootFS ***"
|
||||||
|
sudo raspi-config --expand-rootfs
|
||||||
|
echo ""
|
||||||
|
|
||||||
fi
|
fi
|
||||||
swapExists=$(swapon -s | grep -c /mnt/hdd/swapfile)
|
swapExists=$(swapon -s | grep -c /mnt/hdd/swapfile)
|
||||||
if [ ${swapExists} -eq 1 ]; then
|
if [ ${swapExists} -eq 1 ]; then
|
||||||
@@ -32,11 +38,6 @@ else
|
|||||||
sleep 60
|
sleep 60
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# expand FS of SD
|
|
||||||
echo "*** Expand RootFS ***"
|
|
||||||
sudo raspi-config --expand-rootfs
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
# mark setup is done
|
# mark setup is done
|
||||||
echo "90" > /home/admin/.setup
|
echo "90" > /home/admin/.setup
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user