Skip to content

Commit c576fca

Browse files
committed
init_config: don't attempt to configure wlan if not set
1 parent 97782f1 commit c576fca

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

usr/lib/raspberrypi-sys-mods/init_config

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ def import_ssh_id(ids):
7676
logging.error("Failed to import pubkeys for %s", ", ".join(ids))
7777

7878
def config_ssh (ssh_config):
79-
ssh_import_id = ssh_config.pop("ssh_import_id", None)
80-
import_ssh_id(ssh_import_id)
8179
if not ssh_config:
8280
return
81+
ssh_import_id = ssh_config.pop("ssh_import_id", None)
82+
import_ssh_id(ssh_import_id)
8383
cmd = (imager_custom_path, "enable_ssh")
8484
ssh_enabled = ssh_config.pop("enabled", False)
8585
ssh_password_authentication = ssh_config.pop("password_authentication", None)
@@ -104,6 +104,8 @@ def wpa_passphrase (ssid, passphrase):
104104
return next(psks)
105105

106106
def config_wlan (wlan_config):
107+
if not wlan_config:
108+
return
107109
wlan_ssid = wlan_config.pop("ssid", None)
108110
wlan_password = wlan_config.pop("password", None)
109111
wlan_password_is_encrypted = wlan_config.pop("password_encrypted", True)

0 commit comments

Comments
 (0)