File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
scriptmodules/supplementary Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -276,8 +276,8 @@ function gui_wifi() {
276
276
" 1 Connect to your WiFi network"
277
277
2 " Disconnect/Remove WiFi config"
278
278
" 2 Disconnect and remove any WiFi configuration"
279
- 3 " Import WiFi credentials from /boot/ wifikeyfile.txt"
280
- " 3 Will import the SSID (network name) and PSK (password) from a file at / boot/wifikeyfile.txt
279
+ 3 " Import WiFi credentials from wifikeyfile.txt"
280
+ " 3 Will import the SSID (network name) and PSK (password) from the 'wifikeyfile.txt' file on the boot partition
281
281
282
282
The file should contain two lines as follows\n\nssid = \" YOUR WIFI SSID\" \npsk = \" YOUR PASSWORD\" "
283
283
)
@@ -303,16 +303,20 @@ The file should contain two lines as follows\n\nssid = \"YOUR WIFI SSID\"\npsk =
303
303
remove_${mgmt_tool} _wifi $iface
304
304
;;
305
305
3)
306
- if [[ -f " /boot/wifikeyfile.txt" ]]; then
307
- iniConfig " = " " \" " " /boot/wifikeyfile.txt"
306
+ # check in `/boot/` (pre-bookworm) and `/boot/firmware` (bookworm and later) for the file
307
+ local file=" /boot/wifikeyfile.txt"
308
+ [[ ! -f " $file " ]] && file=" /boot/firmware/wifikeyfile.txt"
309
+
310
+ if [[ -f " $file " ]]; then
311
+ iniConfig " = " " \" " " $file "
308
312
iniGet " ssid"
309
313
local ssid=" $ini_value "
310
314
iniGet " psk"
311
315
local psk=" $ini_value "
312
316
create_${mgmt_tool} _config_wifi " wpa" " $ssid " " $psk " " $iface "
313
317
gui_connect_wifi " $iface "
314
318
else
315
- printMsgs " dialog" " No /boot/ wifikeyfile.txt found"
319
+ printMsgs " dialog" " File ' wifikeyfile.txt' not found on the boot partition! "
316
320
fi
317
321
;;
318
322
esac
You can’t perform that action at this time.
0 commit comments