Skip to content

Commit

Permalink
Ateempting fix for an infinite boot loop caused by changing the SSID
Browse files Browse the repository at this point in the history
  • Loading branch information
jasbur committed Jan 24, 2019
1 parent edc212c commit a98d12b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions libs/reset_device/reset_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,12 @@ def update_ssid(ssid_prefix, serial_last_four):
if ssid_correct == False:
with fileinput.FileInput("/etc/hostapd/hostapd.conf", inplace=True) as file:
for line in file:
reboot_required = True
print(line.replace("temp-ssid", ssid_prefix + serial_last_four), end='')
file.close
if 'ssid=' in line:
line_array = line.split('=')
line_array[1] = ssid_prefix + ' ' + serial_last_four
print(line_array[0] + '=' + line_array[1])

reboot_required = True

return reboot_required

Expand Down

0 comments on commit a98d12b

Please sign in to comment.