summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2021-07-24 05:45:19 -0500
committerDaniil Baturin <daniil@vyos.io>2021-07-24 07:10:01 -0500
commitbdfceaaaab1be47002603ed37ec1b4188e4266ce (patch)
treeafa52711a52f9066453ee52c23d4a7dea670f28c
parentd7ec4e8b33078d0536a8b5da8422234cb7522e4f (diff)
parentd6ae62a4a93b96e1051af5fadb77882dcff1890e (diff)
downloadvyos-1x-bdfceaaaab1be47002603ed37ec1b4188e4266ce.tar.gz
vyos-1x-bdfceaaaab1be47002603ed37ec1b4188e4266ce.zip
Merge branch 'equuleus' of https://github.com/vyos/vyos-1x into equuleus
-rw-r--r--Makefile2
-rwxr-xr-xsrc/etc/vmware-tools/scripts/resume-vm-default.d/ether-resume.py11
2 files changed, 6 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index f0ecafd55..e5a420601 100644
--- a/Makefile
+++ b/Makefile
@@ -110,7 +110,7 @@ clean:
.PHONY: test
test:
- set -e; python3 -m compileall -q .
+ set -e; python3 -m compileall -q -x '/vmware-tools/scripts/' .
PYTHONPATH=python/ python3 -m "nose" --with-xunit src --with-coverage --cover-erase --cover-xml --cover-package src/conf_mode,src/op_mode,src/completion,src/helpers,src/validators,src/tests --verbose
.PHONY: sonar
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)