diff options
author | John Southworth <john.southworth@vyatta.com> | 2011-10-10 11:33:09 -0500 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2011-10-10 11:33:09 -0500 |
commit | 748d1c0fa566f5504b7bb9f1c447bf07a018ae3e (patch) | |
tree | dae125ad36987831d43307b62b2c909c25c4aedc | |
parent | 59840e0fb078e66351a8889f403f54ebc0baadcd (diff) | |
download | vyatta-cfg-748d1c0fa566f5504b7bb9f1c447bf07a018ae3e.tar.gz vyatta-cfg-748d1c0fa566f5504b7bb9f1c447bf07a018ae3e.zip |
Handle operational commands that cannot be run non-interactively from config mode
-rw-r--r-- | functions/interpreter/vyatta-cfg-run | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/functions/interpreter/vyatta-cfg-run b/functions/interpreter/vyatta-cfg-run index 263e61a..52b5b08 100644 --- a/functions/interpreter/vyatta-cfg-run +++ b/functions/interpreter/vyatta-cfg-run @@ -313,11 +313,15 @@ vyatta_config_exit () # run op mode commands vyatta_config_run () { - if [ $# == 0 ]; then - echo Incomplete command - return 1 - fi - /opt/vyatta/bin/vyatta-op-cmd-wrapper "$@" + if [ $# == 0 ]; then + echo -e "\n Incomplete command: run\n" + return 1 + fi + if [[ "set" =~ "$1" ]]; then + _vyatta_op_run "$@" + else + /opt/vyatta/bin/vyatta-op-cmd-wrapper "$@" + fi } ### End Top level command wrappers ### |