summaryrefslogtreecommitdiff
path: root/python/vyos/ifconfig/interface.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-09-25 08:55:36 +0200
committerChristian Poessinger <christian@poessinger.com>2021-09-25 13:10:43 +0200
commit823b03417aa6ac717e785b741541e251c0d4125f (patch)
treea405ddcdbbbcf0d65a8ef72016f1cdbafa0bf6a2 /python/vyos/ifconfig/interface.py
parentc0d5c2a5bc286bf0d448f247512003f396a78c55 (diff)
downloadvyos-1x-823b03417aa6ac717e785b741541e251c0d4125f.tar.gz
vyos-1x-823b03417aa6ac717e785b741541e251c0d4125f.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. (cherry picked from commit 8ba8f0e097527e3aaaf8b395bfc07cce47e2c788)
Diffstat (limited to 'python/vyos/ifconfig/interface.py')
-rw-r--r--python/vyos/ifconfig/interface.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/vyos/ifconfig/interface.py b/python/vyos/ifconfig/interface.py
index 89a562cf6..1098df7fd 100644
--- a/python/vyos/ifconfig/interface.py
+++ b/python/vyos/ifconfig/interface.py
@@ -1146,7 +1146,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]: