diff options
| author | Lukas Märdian <slyon@ubuntu.com> | 2025-03-04 15:03:12 +0100 |
|---|---|---|
| committer | Lukas Märdian <slyon@ubuntu.com> | 2025-03-25 10:57:31 +0100 |
| commit | e16ebdff87a9d463058da5540b2f8e506ae37a33 (patch) | |
| tree | ec7f1ca6fd09441a32f85f27823028d58759587d | |
| parent | 0b2283332de9576f040990947a36403a65af7597 (diff) | |
d/t/base.py: Install backup mgmt network in /run/systemd/network/
| -rw-r--r-- | debian/tests/base.py | 6 |
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']) |