mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-11 05:17:44 +03:00
test-network: use "systemctl restart" to restart networkd
This commit is contained in:
parent
93f5ae6ba2
commit
85b1a14d70
@ -601,8 +601,11 @@ def start_networkd():
|
||||
check_output('systemctl start systemd-networkd')
|
||||
|
||||
def restart_networkd(show_logs=True):
|
||||
stop_networkd(show_logs)
|
||||
start_networkd()
|
||||
if show_logs:
|
||||
invocation_id = check_output('systemctl show systemd-networkd.service -p InvocationID --value')
|
||||
check_output('systemctl restart systemd-networkd.service')
|
||||
if show_logs:
|
||||
print(check_output('journalctl _SYSTEMD_INVOCATION_ID=' + invocation_id))
|
||||
|
||||
def networkctl_reconfigure(*links):
|
||||
check_output(*networkctl_cmd, 'reconfigure', *links, env=env)
|
||||
|
Loading…
Reference in New Issue
Block a user