mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-25 19:21:57 +02:00
make mem copy of wifi config on inspect unmounted
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user