diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-10-14 21:48:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-14 21:48:54 +0200 |
commit | 5c5fe70a36224ffee505483cf8c77bd3a662d816 (patch) | |
tree | 3a979eb8b9ac5168d07ffe55d67042cbbdc28321 | |
parent | a99b4ea5ca285a776210ca126b87972767d1aa59 (diff) | |
parent | 6bbabb8e7a4e0217e10bd380313c6658b4be8067 (diff) | |
download | vyatta-cfg-5c5fe70a36224ffee505483cf8c77bd3a662d816.tar.gz vyatta-cfg-5c5fe70a36224ffee505483cf8c77bd3a662d816.zip |
Merge pull request #19 from jjakob/equuleus
T1604: run bash builtin "set" as-is in vyatta_cfg_run
-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=( "$@" ) |