diff options
author | Daniil Baturin <daniil@baturin.org> | 2018-08-12 05:35:20 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-12 05:35:20 +0700 |
commit | f1720d121911ab14f4925dd9c1075e9d05c8bf79 (patch) | |
tree | 2bf5ba922a846dcb128a2a8227d1a01f75f09912 /src/validators | |
parent | 5e58b540451fe7892f824bcc6b691c61ffd6a3d7 (diff) | |
parent | 12ce8b309d2535ba7277da4561bdd80bb89185be (diff) | |
download | vyos-1x-f1720d121911ab14f4925dd9c1075e9d05c8bf79.tar.gz vyos-1x-f1720d121911ab14f4925dd9c1075e9d05c8bf79.zip |
Merge pull request #26 from dsmouse/current
T772 allow stow-away arguments in the script name field https://phabr…
Diffstat (limited to 'src/validators')
-rwxr-xr-x | src/validators/script | 4 |
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)) |