make mem copy of wifi config on inspect unmounted

This commit is contained in:
rootzoll
2021-05-03 23:53:34 +02:00
parent 9ed9215d24
commit 9ded756d5f

View File

@@ -71,7 +71,7 @@ if [ "$1" = "status" ]; then
echo "isMounted=${isMounted}"
echo "isBTRFS=${isBTRFS}"
# if HDD is not mounted system is in the pre-setup phase
# if HDD is not mounted system then it is in the pre-setup phase
# deliver all the detailes needed about the data drive
# and it content for the setup dialogs
if [ ${isMounted} -eq 0 ]; then
@@ -268,6 +268,14 @@ if [ "$1" = "status" ]; then
fi
echo "hddGotMigrationData='${hddGotMigrationData}'"
# check if there is a wifi configuration as backup
wifiBackupConfigExists=$(ls /mnt/hdd/app-data/wpa_supplicant.conf 2>/dev/null | grep -c "wpa_supplicant.conf")
if [ ${wifiBackupConfigExists} -eq 1 ]; then
# make a copy to the mem cache drive (so that Wifi can be connected before setup & final HDD mount)
sudo cp /mnt/hdd/app-data/wpa_supplicant.conf /var/cache/raspiblitz/wpa_supplicant.conf
echo "wifiBackupConfigCopy='/var/cache/raspiblitz/wpa_supplicant.conf'"
fi
# unmount
sudo umount /mnt/storage
fi