summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-06-08 08:17:05 +0200
committerChristian Poessinger <christian@poessinger.com>2021-06-08 08:17:05 +0200
commit88676e526c8f86e96af5cfe0811c6a7dcdf63b92 (patch)
tree716c0ca371266e44a8dd1ca4a37432aeea7cb03d
parentbe4b097b94d621e3ef55fa55c17c338f6edeb392 (diff)
downloadvyos-1x-88676e526c8f86e96af5cfe0811c6a7dcdf63b92.tar.gz
vyos-1x-88676e526c8f86e96af5cfe0811c6a7dcdf63b92.zip
T3170: check if any generated node.def file is empty
-rw-r--r--Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index b954bda8c..f0ecafd55 100644
--- a/Makefile
+++ b/Makefile
@@ -60,6 +60,10 @@ interface_definitions: $(config_xml_obj)
cp $(TMPL_DIR)/interfaces/ethernet/node.tag/ip/node.def $(TMPL_DIR)/interfaces/vti/node.tag/ip
cp $(TMPL_DIR)/interfaces/ethernet/node.tag/ipv6/node.def $(TMPL_DIR)/interfaces/vti/node.tag/ipv6
+ # XXX: test if there are empty node.def files - this is not allowed as these
+ # could mask help strings or mandatory priority statements
+ find $(TMPL_DIR) -name node.def -type f -empty -exec false {} + || sh -c 'echo "There are empty node.def files! Check your interface definitions." && exit 1'
+
.PHONY: op_mode_definitions
.ONESHELL:
op_mode_definitions: $(op_xml_obj)