diff options
author | jjakob <jernej.jakob@gmail.com> | 2019-09-07 22:14:44 +0200 |
---|---|---|
committer | jjakob <jernej.jakob@gmail.com> | 2019-09-07 22:14:44 +0200 |
commit | d0ea8db97d3b26bf004c0d1285fad009ed9ef1da (patch) | |
tree | 5d8d62bac6ce613289502c3171208a0678efe30a /functions | |
parent | 66753705b86a3d104dfe127d4dd2b904a54ab404 (diff) | |
download | vyatta-op-d0ea8db97d3b26bf004c0d1285fad009ed9ef1da.tar.gz vyatta-op-d0ea8db97d3b26bf004c0d1285fad009ed9ef1da.zip |
T1604: run bash builtin "set" as-is in _vyatta_op_run
Diffstat (limited to 'functions')
-rw-r--r-- | functions/interpreter/vyatta-op-run | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/functions/interpreter/vyatta-op-run b/functions/interpreter/vyatta-op-run index b0f72ae..ee4cb1c 100644 --- a/functions/interpreter/vyatta-op-run +++ b/functions/interpreter/vyatta-op-run @@ -155,6 +155,14 @@ _vyatta_op_conv_run_cmd () _vyatta_op_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 + local -i estat local tpath=$vyatta_op_templates local restore_shopts=$( shopt -p extglob nullglob | tr \\n \; ) |