Skip to content

Commit

Permalink
init_config: don't attempt to configure wlan if not set
Browse files Browse the repository at this point in the history
  • Loading branch information
XECDesign committed Oct 19, 2022
1 parent 97782f1 commit c576fca
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions usr/lib/raspberrypi-sys-mods/init_config
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ def import_ssh_id(ids):
logging.error("Failed to import pubkeys for %s", ", ".join(ids))

def config_ssh (ssh_config):
ssh_import_id = ssh_config.pop("ssh_import_id", None)
import_ssh_id(ssh_import_id)
if not ssh_config:
return
ssh_import_id = ssh_config.pop("ssh_import_id", None)
import_ssh_id(ssh_import_id)
cmd = (imager_custom_path, "enable_ssh")
ssh_enabled = ssh_config.pop("enabled", False)
ssh_password_authentication = ssh_config.pop("password_authentication", None)
Expand All @@ -104,6 +104,8 @@ def wpa_passphrase (ssid, passphrase):
return next(psks)

def config_wlan (wlan_config):
if not wlan_config:
return
wlan_ssid = wlan_config.pop("ssid", None)
wlan_password = wlan_config.pop("password", None)
wlan_password_is_encrypted = wlan_config.pop("password_encrypted", True)
Expand Down

0 comments on commit c576fca

Please sign in to comment.