summaryrefslogtreecommitdiff
path: root/functions/interpreter/vyatta-op-run
diff options
context:
space:
mode:
Diffstat (limited to 'functions/interpreter/vyatta-op-run')
-rw-r--r--functions/interpreter/vyatta-op-run4
1 files changed, 3 insertions, 1 deletions
diff --git a/functions/interpreter/vyatta-op-run b/functions/interpreter/vyatta-op-run
index ee4cb1c..6bf6645 100644
--- a/functions/interpreter/vyatta-op-run
+++ b/functions/interpreter/vyatta-op-run
@@ -218,7 +218,9 @@ _vyatta_op_run ()
local run_cmd=$(_vyatta_op_get_node_def_field $tpath/node.def run)
run_cmd=$(_vyatta_op_conv_run_cmd "$run_cmd") # convert the positional parameters
local ret=0
- local cmd_regex="^(LESSOPEN=|less|pager|tail|/opt/vyatta/bin/vyatta-tshark-interface-port.pl).*"
+ # Exception for the `show file` command
+ local file_cmd='\$\{vyos_op_scripts_dir\}\/file\.py'
+ local cmd_regex="^(LESSOPEN=|less|pager|tail|(sudo )?$file_cmd).*"
if [ -n "$run_cmd" ]; then
eval $restore_shopts
if [[ -t 1 && "${args[1]}" == "show" && ! $run_cmd =~ $cmd_regex ]] ; then