From 7c936988d61c8e31e56e73e975890024f0ece370 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Thu, 1 Aug 2024 19:18:36 -0500 Subject: T6629: call check_kmod within a standard config function Move the remaining calls to check_kmod within a standard function, with placement determined by the needs of the config script. (cherry picked from commit 95eef73f1b002c8b9e8e769135ffed50c8ca6890) --- src/conf_mode/interfaces_wireguard.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/conf_mode/interfaces_wireguard.py') diff --git a/src/conf_mode/interfaces_wireguard.py b/src/conf_mode/interfaces_wireguard.py index 0e0b77877..482da1c66 100755 --- a/src/conf_mode/interfaces_wireguard.py +++ b/src/conf_mode/interfaces_wireguard.py @@ -104,6 +104,8 @@ def verify(wireguard): public_keys.append(peer['public_key']) def apply(wireguard): + check_kmod('wireguard') + if 'rebuild_required' in wireguard or 'deleted' in wireguard: wg = WireGuardIf(**wireguard) # WireGuard only supports peer removal based on the configured public-key, @@ -123,7 +125,6 @@ def apply(wireguard): if __name__ == '__main__': try: - check_kmod('wireguard') c = get_config() verify(c) apply(c) -- cgit v1.2.3