about summary refs log tree commit diff
path: root/debian/tests
diff options
context:
space:
mode:
authorLukas Märdian <slyon@ubuntu.com>2025-03-04 15:03:12 +0100
committerLukas Märdian <slyon@ubuntu.com>2025-03-25 10:57:31 +0100
commite16ebdff87a9d463058da5540b2f8e506ae37a33 (patch)
treeec7f1ca6fd09441a32f85f27823028d58759587d /debian/tests
parent0b2283332de9576f040990947a36403a65af7597 (diff)
d/t/base.py: Install backup mgmt network in /run/systemd/network/
Diffstat (limited to 'debian/tests')
-rw-r--r--debian/tests/base.py6
1 files 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'])