From e16ebdff87a9d463058da5540b2f8e506ae37a33 Mon Sep 17 00:00:00 2001 From: Lukas Märdian Date: Tue, 4 Mar 2025 15:03:12 +0100 Subject: d/t/base.py: Install backup mgmt network in /run/systemd/network/ --- debian/tests/base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/tests/base.py b/debian/tests/base.py index 26220a08..5b125f5f 100644 --- a/debian/tests/base.py +++ b/debian/tests/base.py @@ -61,7 +61,7 @@ def set_up_module(): def tear_down_module(): # Make sure the management network stays up-and-running. - if os.path.exists('/etc/systemd/network/20-wired.network'): + if os.path.exists('/run/systemd/network/20-wired.network'): subprocess.check_call(['systemctl', 'restart', 'systemd-networkd.service']) else: print("WARNING: mgmt network config (20-wired.network) not found. " @@ -86,8 +86,8 @@ class NetworkTestBase(unittest.TestCase): # Try to keep autopkgtest's management network (eth0/ens3) up and # configured. It should be running all the time, independently via # systemd-networkd, potentially overriding 10-netplan-*.network config. - os.makedirs('/etc/systemd/network', exist_ok=True) - with open('/etc/systemd/network/20-wired.network', 'w') as f: + os.makedirs('/run/systemd/network', exist_ok=True) + with open('/run/systemd/network/20-wired.network', 'w') as f: f.write('[Match]\nName=eth0 en*\n\n[Network]\nDHCP=yes\nKeepConfiguration=yes') subprocess.check_call(['systemctl', 'restart', 'systemd-networkd.service']) -- cgit 1.3.0-6-gf8a5