Skip to content

Commit

Permalink
cable-guy: fix using settings instead of properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Williangalvani authored and patrickelectric committed Jan 13, 2025
1 parent f4f7cf9 commit 66350c8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/services/cable_guy/networksetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ def add_static_ip(self, interface_name: str, ip: str) -> None:
logger.info(f"IP {ip} already exists for {interface_name}")
continue
new_ip = AddressData(address=ip, prefix=24)
settings["ipv4"]["method"] = ("s", "shared")
properties = settings.get_settings()
properties["ipv4"]["method"] = ("s", "shared")
settings.update(properties)
settings.save()
data.ipv4.address_data.append(new_ip)
settings.update_profile(data)
network_manager.activate_connection(connection_path)
Expand Down

0 comments on commit 66350c8

Please sign in to comment.