mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-10-02 12:12:51 +02:00
catch mounted hdd
This commit is contained in:
@@ -216,7 +216,6 @@ if [ ${isMounted} -eq 0 ]; then
|
||||
echo "Refreshing links between directories/drives .." >> $logFile
|
||||
sudo /home/admin/config.scripts/blitz.datadrive.sh link
|
||||
|
||||
# UPDATE MIGRATION & CONFIG PROVISIONING
|
||||
# check if HDD contains already a configuration
|
||||
configExists=$(ls ${configFile} | grep -c '.conf')
|
||||
echo "HDD contains already a configuration: ${configExists}" >> $logFile
|
||||
@@ -244,7 +243,7 @@ if [ ${isMounted} -eq 0 ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# if config is still valid ...
|
||||
# UPDATE MIGRATION & CONFIG PROVISIONING
|
||||
if [ ${configExists} -eq 1 ]; then
|
||||
echo "Found valid configuration" >> $logFile
|
||||
sed -i "s/^state=.*/state=recovering/g" ${infoFile}
|
||||
@@ -278,6 +277,14 @@ if [ ${isMounted} -eq 0 ]; then
|
||||
|
||||
fi # END - no automount - after this HDD is mounted
|
||||
|
||||
# config should exist now
|
||||
configExists=$(ls ${configFile} | grep -c '.conf')
|
||||
if [ ${configExists} -eq 0 ]; then
|
||||
sed -i "s/^state=.*/state=waitsetup/g" ${infoFile}
|
||||
sed -i "s/^message=.*/message='no config'/g" ${infoFile}
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# make sure all links between directories/drives are correct
|
||||
echo "Refreshing links between directories/drives .." >> $logFile
|
||||
sudo /home/admin/config.scripts/blitz.datadrive.sh link >> $logFile
|
||||
|
Reference in New Issue
Block a user