diff options
author | Yun Zheng Hu <yunzheng.hu@gmail.com> | 2021-07-15 01:16:01 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-07-15 05:52:44 +0200 |
commit | a2ff17e46ec030168de044ac06ffd5023a3d6a22 (patch) | |
tree | 904b328761808e3ce4a4adeee23265987e44bb8b | |
parent | 4cc57a4819c138896c77a3da7013d019a483e2eb (diff) | |
download | vyos-1x-a2ff17e46ec030168de044ac06ffd5023a3d6a22.tar.gz vyos-1x-a2ff17e46ec030168de044ac06ffd5023a3d6a22.zip |
vyos-1x-vmware: T3682: remove dhclient from ether-resume.py
dhclient is already handled by netplug so it's removed to avoid double
renewing of dhcp leases.
-rwxr-xr-x | src/etc/vmware-tools/scripts/resume-vm-default.d/ether-resume.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/etc/vmware-tools/scripts/resume-vm-default.d/ether-resume.py b/src/etc/vmware-tools/scripts/resume-vm-default.d/ether-resume.py index ec33906ba..4e7fb117c 100755 --- a/src/etc/vmware-tools/scripts/resume-vm-default.d/ether-resume.py +++ b/src/etc/vmware-tools/scripts/resume-vm-default.d/ether-resume.py @@ -25,9 +25,8 @@ def get_config(): c = Config() interfaces = dict() for intf in c.list_effective_nodes('interfaces ethernet'): - # skip interfaces that are disabled or is configured for dhcp + # skip interfaces that are disabled check_disable = f'interfaces ethernet {intf} disable' - check_dhcp = f'interfaces ethernet {intf} address dhcp' if c.exists_effective(check_disable): continue @@ -49,10 +48,10 @@ def apply(config): # add configured addresses to interface for addr in addresses: - if addr == 'dhcp': - cmd = ['dhclient', intf] - else: - cmd = f'ip address add {addr} dev {intf}' + # dhcp is handled by netplug + if addr in ['dhcp', 'dhcpv6']: + continue + cmd = f'ip address add {addr} dev {intf}' syslog.syslog(cmd) run(cmd) |