From 9ded756d5fa5d661e70d935c2faf7be2f8f1a829 Mon Sep 17 00:00:00 2001 From: rootzoll Date: Mon, 3 May 2021 23:53:34 +0200 Subject: [PATCH] make mem copy of wifi config on inspect unmounted --- home.admin/config.scripts/blitz.datadrive.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/home.admin/config.scripts/blitz.datadrive.sh b/home.admin/config.scripts/blitz.datadrive.sh index f08ee1eb8..239944ce9 100755 --- a/home.admin/config.scripts/blitz.datadrive.sh +++ b/home.admin/config.scripts/blitz.datadrive.sh @@ -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