From: Yu Watanabe Date: Fri, 31 May 2019 00:52:27 +0000 (+0900) Subject: test-network: stop service before editing unit file X-Git-Tag: v243-rc1~333^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d4fda2a55cea9a773d8da349864906c0b956c9b7;p=thirdparty%2Fsystemd.git test-network: stop service before editing unit file --- diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index d39df360ab2..692bd19159f 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -87,6 +87,7 @@ def setUpModule(): copytree(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'conf'), networkd_ci_path) subprocess.check_call('systemctl stop systemd-networkd.socket', shell=True) + subprocess.check_call('systemctl stop systemd-networkd.service', shell=True) drop_in = [ '[Service]', @@ -122,10 +123,12 @@ def setUpModule(): def tearDownModule(): shutil.rmtree(networkd_ci_path) + + subprocess.check_call('systemctl stop systemd-networkd.service', shell=True) + shutil.rmtree('/run/systemd/system/systemd-networkd.service.d') subprocess.check_call('systemctl daemon-reload', shell=True) - subprocess.check_call('systemctl stop systemd-networkd.service', shell=True) subprocess.check_call('systemctl start systemd-networkd.socket', shell=True) subprocess.check_call('systemctl start systemd-networkd.service', shell=True)