mirror of
https://github.com/systemd/systemd
synced 2024-09-06 08:46:19 +00: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 a new issue