mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-03-28 18:52:11 +01:00
#4872 FS expand only when booti from sd card
This commit is contained in:
parent
5d61034626
commit
9a03a70593
@ -384,6 +384,8 @@ done
|
||||
# extend sd card to maximum capacity
|
||||
################################
|
||||
|
||||
isBootingFromSD=$(lsblk | grep mmcblk0 | grep -c "/boot")
|
||||
if [ ${isBootingFromSD} -gt 0 ]; then
|
||||
source <(/home/admin/config.scripts/blitz.bootdrive.sh status)
|
||||
if [ "${needsExpansion}" == "1" ] && [ "${fsexpanded}" == "0" ]; then
|
||||
echo "FSEXPAND needed ... starting process" >> $logFile
|
||||
@ -399,11 +401,14 @@ elif [ "${tooSmall}" == "1" ]; then
|
||||
echo "System stopped. Please cut power." >> $logFile
|
||||
sleep 6000
|
||||
shutdown -r now
|
||||
slepp 100
|
||||
sleep 100
|
||||
exit 1
|
||||
else
|
||||
echo "No FS EXPAND needed. needsExpansion(${needsExpansion}) fsexpanded(${fsexpanded})" >> $logFile
|
||||
fi
|
||||
else
|
||||
echo "Not running on an SD card. Skipping FS EXPAND check." >> $logFile
|
||||
fi
|
||||
|
||||
# now that HDD/SSD is connected ... if relevant data from a previous RaspiBlitz was available
|
||||
# /var/cache/raspiblitz/hdd-inspect exists with copy of config data to init system with
|
||||
|
Loading…
x
Reference in New Issue
Block a user