diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-12-05 21:59:38 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-12-07 12:25:24 +0100 |
commit | 8e0ba0c984bc39e76d993c64bf6efd427268613d (patch) | |
tree | f9b900df8eb0856b19da7b13fcdf0e2837173f48 /test/networkd-test.py | |
parent | fef740aed354098af505c300bed13fdf0f251064 (diff) | |
download | systemd-8e0ba0c984bc39e76d993c64bf6efd427268613d.tar.gz |
networkd-test: restart hostnamed after reverting /etc/hostname too
Otherwise hostnamed will not report the right data in the next test
Diffstat (limited to 'test/networkd-test.py')
-rwxr-xr-x | test/networkd-test.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/networkd-test.py b/test/networkd-test.py index 3f9d4b4dff..0dc19a616e 100755 --- a/test/networkd-test.py +++ b/test/networkd-test.py @@ -709,6 +709,7 @@ Domains= ~company ~lab''') subprocess.check_call(['mount', '--bind', '/dev/null', '/etc/hostname']) self.addCleanup(subprocess.call, ['umount', '/etc/hostname']) subprocess.check_call(['systemctl', 'stop', 'systemd-hostnamed.service']) + self.addCleanup(subprocess.call, ['systemctl', 'stop', 'systemd-hostnamed.service']) self.create_iface(dnsmasq_opts=['--dhcp-host={},192.168.5.210,testgreen'.format(self.iface_mac)]) self.do_test(coldplug=None, extra_opts='IPv6AcceptRA=False', dhcp_mode='ipv4') @@ -744,6 +745,7 @@ Domains= ~company ~lab''') if not os.path.exists('/etc/hostname'): self.write_config('/etc/hostname', orig_hostname) subprocess.check_call(['systemctl', 'stop', 'systemd-hostnamed.service']) + self.addCleanup(subprocess.call, ['systemctl', 'stop', 'systemd-hostnamed.service']) self.create_iface(dnsmasq_opts=['--dhcp-host={},192.168.5.210,testgreen'.format(self.iface_mac)]) self.do_test(coldplug=None, extra_opts='IPv6AcceptRA=False', dhcp_mode='ipv4') |