summaryrefslogtreecommitdiff
path: root/src/validators
diff options
context:
space:
mode:
authorPeri Diane Jones <gitlab.com@dsmouse.com>2018-08-11 22:28:13 +0000
committerPeri Diane Jones <gitlab.com@dsmouse.com>2018-08-11 22:28:13 +0000
commit12ce8b309d2535ba7277da4561bdd80bb89185be (patch)
tree2bf5ba922a846dcb128a2a8227d1a01f75f09912 /src/validators
parent5e58b540451fe7892f824bcc6b691c61ffd6a3d7 (diff)
downloadvyos-1x-12ce8b309d2535ba7277da4561bdd80bb89185be.tar.gz
vyos-1x-12ce8b309d2535ba7277da4561bdd80bb89185be.zip
T772 allow stow-away arguments in the script name field https://phabricator.vyos.net/T772
Diffstat (limited to 'src/validators')
-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))