summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Lee <dlqs@gmx.com>2021-07-24 00:29:21 +0800
committerDonald Lee <dlqs@gmx.com>2021-07-24 00:45:22 +0800
commit8be973f5c29fdadd1a156fd60bcb66a0d58d695c (patch)
treecafbc796d3629223f9277b713e291dfc54d36d45
parent1da9c4bdbb5ffdaf83af482af031fa97ed47eb15 (diff)
lib: Add function name to script command
Signed-off-by: Donald Lee <dlqs@gmx.com>
-rw-r--r--lib/command.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/command.c b/lib/command.c
index 4da59c9dd6..122e189342 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -2419,11 +2419,10 @@ DEFUN(find,
}
#if defined(DEV_BUILD) && defined(HAVE_SCRIPTING)
-DEFUN(script,
- script_cmd,
- "script SCRIPT",
- "Test command - execute a script\n"
- "Script name (same as filename in /etc/frr/scripts/\n")
+DEFUN(script, script_cmd, "script SCRIPT FUNCTION",
+ "Test command - execute a function in a script\n"
+ "Script name (same as filename in /etc/frr/scripts/)\n"
+ "Function name (in the script)\n")
{
struct prefix p;
@@ -2432,7 +2431,7 @@ DEFUN(script,
if (frrscript_load(fs, argv[2]->arg, NULL)) {
vty_out(vty,
- "/etc/frr/scripts%s.lua or function '/%s' not found\n",
+ "/etc/frr/scripts/%s.lua or function '%s' not found\n",
argv[1]->arg, argv[2]->arg);
}