From e5b485b72eca4bbe2b72b398d3cb4c87c5ae976d Mon Sep 17 00:00:00 2001 From: Ezri Brimhall Date: Tue, 3 Feb 2026 16:22:06 -0700 Subject: [PATCH] fixed a vpnc issue --- src/vpn_manager_globalprotect/vpnc.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vpn_manager_globalprotect/vpnc.py b/src/vpn_manager_globalprotect/vpnc.py index 82866e4..d2c2c77 100644 --- a/src/vpn_manager_globalprotect/vpnc.py +++ b/src/vpn_manager_globalprotect/vpnc.py @@ -279,9 +279,11 @@ async def configure_with_networkd(): else: filename = f"10-{config.tun_device}.network" + path = Path("/run/systemd/network") / filename + if config.reason in {Reason.CONNECT, Reason.ATTEMPT_RECONNECT, Reason.RECONNECT}: # only write out the file if the reason indicates a new connection. - config.write_config(Path("/run/systemd/network") / filename) + config.write_config(path) elif config.reason == Reason.PRE_INIT: # idk what this does, but the script does it, so we will too. try: @@ -296,7 +298,7 @@ async def configure_with_networkd(): os.close(fd) return elif config.reason == Reason.DISCONNECT: - config.destroy_config() + config.destroy_config(path) # always reload networkd state unless it's the config. bus = bus_var.get() intro = await bus.introspect(