summaryrefslogtreecommitdiff
path: root/src/validators/script
diff options
context:
space:
mode:
authorhagbard <vysodev@derith.de>2018-08-11 16:09:18 -0700
committerhagbard <vysodev@derith.de>2018-08-11 16:09:18 -0700
commita8312b64a2baf0d5c604a0850f7409b0505b36dc (patch)
tree6817341127bf7ee4c2183b59dcb3148f4eb47d7e /src/validators/script
parent1472afe76f525a38f8d3da98fa933f7b49ae10f0 (diff)
parentf1720d121911ab14f4925dd9c1075e9d05c8bf79 (diff)
downloadvyos-1x-a8312b64a2baf0d5c604a0850f7409b0505b36dc.tar.gz
vyos-1x-a8312b64a2baf0d5c604a0850f7409b0505b36dc.zip
Merge remote-tracking branch 'upstream/current' into current
Diffstat (limited to 'src/validators/script')
-rwxr-xr-xsrc/validators/script4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/validators/script b/src/validators/script
index beeba57ae..689296a73 100755
--- a/src/validators/script
+++ b/src/validators/script
@@ -20,6 +20,7 @@
import re
import os
import sys
+import shlex
import vyos.util
@@ -28,7 +29,8 @@ if len(sys.argv) < 2:
print("Please specify script file to check")
sys.exit(1)
-script = sys.argv[1]
+#if the "script" is a script+ stowaway arugments, this removes the aguements
+script = shlex.split(sys.argv[1])[0]
if not os.path.exists(script):
print("File {0} does not exist".format(script))