diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-09-25 08:55:36 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-09-25 08:55:36 +0200 |
commit | 8ba8f0e097527e3aaaf8b395bfc07cce47e2c788 (patch) | |
tree | f4517f78f85591356d6c6f262b4b82fabca3e41e /python | |
parent | 6187ce264a39cd72285f6cb73cc746a04268c253 (diff) | |
download | vyos-1x-8ba8f0e097527e3aaaf8b395bfc07cce47e2c788.tar.gz vyos-1x-8ba8f0e097527e3aaaf8b395bfc07cce47e2c788.zip |
vyos.ifconfig: dhcp: T3300: always re-start dhcp client instead of start
Commit dd2eb5e5686655 ("dhcp: T3300: add DHCP default route distance") changed
the logic on how the DHCP process is going to be started. The systemd unit was
always "started" even if it was already running. It should rather be re-started
to track changes in e.g. the DHCP hostname setting.
Diffstat (limited to 'python')
-rwxr-xr-x | python/vyos/ifconfig/interface.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/vyos/ifconfig/interface.py b/python/vyos/ifconfig/interface.py index 8857f30e9..b9ba90b61 100755 --- a/python/vyos/ifconfig/interface.py +++ b/python/vyos/ifconfig/interface.py @@ -1221,7 +1221,7 @@ class Interface(Control): # 'up' check is mandatory b/c even if the interface is A/D, as soon as # the DHCP client is started the interface will be placed in u/u state. # This is not what we intended to do when disabling an interface. - return self._cmd(f'systemctl start dhclient@{ifname}.service') + return self._cmd(f'systemctl restart {systemd_service}') else: # cleanup old config files for file in [config_file, options_file, pid_file, lease_file]: |