summaryrefslogtreecommitdiff
path: root/scripts/build-command-templates
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-05-16 16:01:38 +0200
committerDaniil Baturin <daniil@baturin.org>2018-05-16 16:02:33 +0200
commitd4c10902026b76a6372cf738fc98860b29b39759 (patch)
treec8d3958d564f876b74e80f68727bbe5f02a57aed /scripts/build-command-templates
parentbe6f809581ccbcd6411713128a63711eaa2ce6b7 (diff)
downloadvyos-1x-d4c10902026b76a6372cf738fc98860b29b39759.tar.gz
vyos-1x-d4c10902026b76a6372cf738fc98860b29b39759.zip
T644: remove prefixing from all scripts and update environment variables with VyOS paths.
Diffstat (limited to 'scripts/build-command-templates')
-rwxr-xr-xscripts/build-command-templates5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/build-command-templates b/scripts/build-command-templates
index 9f51c00cd..a99f317d7 100755
--- a/scripts/build-command-templates
+++ b/scripts/build-command-templates
@@ -30,7 +30,8 @@ from lxml import etree as ET
# Defaults
-validator_dir = "/opt/vyatta/libexec/validators"
+#validator_dir = "/usr/libexec/vyos/validators"
+validator_dir = "${vyos_validators_dir}"
default_constraint_err_msg = "Invalid value"
@@ -147,7 +148,7 @@ def get_properties(p):
regex_args = " ".join(map(lambda s: "--regex \\\'{0}\\\'".format(s), regexes))
validator_args = " ".join(map(lambda s: "--exec \\\"{0}\\\"".format(s), validators))
- validator_script = '${vyos_libexecdir}/validate-value.py'
+ validator_script = '${vyos_libexec_dir}/validate-value.py'
validator_string = "exec \"{0} {1} {2} --value \\\'$VAR(@)\\\'\"; \"{3}\"".format(validator_script, regex_args, validator_args, error_msg)
props["constraint"] = validator_string