summaryrefslogtreecommitdiff
path: root/src/etc/vmware-tools/scripts
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-07-24 11:30:37 +0200
committerGitHub <noreply@github.com>2021-07-24 11:30:37 +0200
commit165ac2ef628b6e0013ef9eb0de6c9490649cd970 (patch)
tree71ba7348491c63946eb5f4b2d7dc62922afea8db /src/etc/vmware-tools/scripts
parent483e0b3327918719fb38dbdd9b6fb755aecce2eb (diff)
parent96acb4f233cab5d7e7e7fabc8789819ffd8af5a4 (diff)
downloadvyos-1x-165ac2ef628b6e0013ef9eb0de6c9490649cd970.tar.gz
vyos-1x-165ac2ef628b6e0013ef9eb0de6c9490649cd970.zip
Merge pull request #941 from yunzheng/T3682
vyos-1x-vmware: T3682: remove dhclient from ether-resume.py
Diffstat (limited to 'src/etc/vmware-tools/scripts')
-rwxr-xr-xsrc/etc/vmware-tools/scripts/resume-vm-default.d/ether-resume.py11
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)