diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-08-14 03:56:01 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-08-14 03:56:01 +0900 |
commit | 85b1a14d70c8da27853512d6f620afb029518b1a (patch) | |
tree | ba4c6a9da90f7fd58e050e1134cab5d50ff89cbe /test | |
parent | 93f5ae6ba230e59a60180a2caf7561e8a3691216 (diff) | |
download | systemd-85b1a14d70c8da27853512d6f620afb029518b1a.tar.gz |
test-network: use "systemctl restart" to restart networkd
Diffstat (limited to 'test')
-rwxr-xr-x | test/test-network/systemd-networkd-tests.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index 4a3fe4279d..ca96f79428 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -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) |