mirror of
https://github.com/systemd/systemd.git
synced 2025-03-10 16:58:28 +03:00
test-network: tentatively stops .socket units for udevd
To suppress the following warning: --- Warning: Stopping systemd-udevd.service, but it can still be activated by: systemd-udevd-control.socket systemd-udevd-kernel.socket
This commit is contained in:
parent
b241fa00e9
commit
f7ada4b8ec
@ -165,7 +165,9 @@ def setUpModule():
|
||||
shutil.rmtree(networkd_ci_path)
|
||||
copytree(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'conf'), networkd_ci_path)
|
||||
|
||||
for u in ['systemd-networkd.socket', 'systemd-networkd.service', 'systemd-resolved.service', 'systemd-udevd.service', 'firewalld.service']:
|
||||
for u in ['systemd-networkd.socket', 'systemd-networkd.service', 'systemd-resolved.service',
|
||||
'systemd-udevd-kernel.socket', 'systemd-udevd-control.socket', 'systemd-udevd.service',
|
||||
'firewalld.service']:
|
||||
if call(f'systemctl is-active --quiet {u}') == 0:
|
||||
check_output(f'systemctl stop {u}')
|
||||
running_units.append(u)
|
||||
@ -249,13 +251,14 @@ def tearDownModule():
|
||||
|
||||
shutil.rmtree(networkd_ci_path)
|
||||
|
||||
for u in ['systemd-networkd.service', 'systemd-resolved.service', 'systemd-udevd.service']:
|
||||
for u in ['systemd-networkd.service', 'systemd-resolved.service']:
|
||||
check_output(f'systemctl stop {u}')
|
||||
|
||||
shutil.rmtree('/run/systemd/system/systemd-networkd.service.d')
|
||||
shutil.rmtree('/run/systemd/system/systemd-resolved.service.d')
|
||||
shutil.rmtree('/run/systemd/system/systemd-udevd.service.d')
|
||||
check_output('systemctl daemon-reload')
|
||||
check_output('systemctl restart systemd-udevd.service')
|
||||
|
||||
for u in running_units:
|
||||
check_output(f'systemctl start {u}')
|
||||
|
Loading…
x
Reference in New Issue
Block a user