diff options
author | jjakob <jernej.jakob@gmail.com> | 2019-10-14 21:13:57 +0200 |
---|---|---|
committer | jjakob <jernej.jakob@gmail.com> | 2019-10-14 21:13:57 +0200 |
commit | 6bbabb8e7a4e0217e10bd380313c6658b4be8067 (patch) | |
tree | 3a979eb8b9ac5168d07ffe55d67042cbbdc28321 /functions/interpreter | |
parent | a99b4ea5ca285a776210ca126b87972767d1aa59 (diff) | |
download | vyatta-cfg-6bbabb8e7a4e0217e10bd380313c6658b4be8067.tar.gz vyatta-cfg-6bbabb8e7a4e0217e10bd380313c6658b4be8067.zip |
T1604: run bash builtin "set" as-is in vyatta_cfg_run
Diffstat (limited to 'functions/interpreter')
-rw-r--r-- | functions/interpreter/vyatta-cfg-run | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/functions/interpreter/vyatta-cfg-run b/functions/interpreter/vyatta-cfg-run index 3ec3d6f..5034284 100644 --- a/functions/interpreter/vyatta-cfg-run +++ b/functions/interpreter/vyatta-cfg-run @@ -509,6 +509,14 @@ vyatta_cfg_cmd () ### Main run command ### vyatta_cfg_run () { + # if run with bash builtin "set -/+*" run set and return + # this happens when a different completion script runs eval "set ..." + # (VyOS T1604) + if [[ "$1" == "set" && "$2" =~ ^(-|\+).* ]]; then + set "${@:2}" + return + fi + # validate top level command and execute proper function local cmd=$1 local -a args=( "$@" ) |