]> git.proxmox.com Git - mirror_frr.git/commitdiff
lib: Add function name to script command
authorDonald Lee <dlqs@gmx.com>
Fri, 23 Jul 2021 16:29:21 +0000 (00:29 +0800)
committerDonald Lee <dlqs@gmx.com>
Fri, 23 Jul 2021 16:45:22 +0000 (00:45 +0800)
Signed-off-by: Donald Lee <dlqs@gmx.com>
lib/command.c

index 4da59c9dd671e2fcf9f5b8e0aec721db8f39b4f5..122e18934262368cac139d49a53a3ac502ccb62e 100644 (file)
@@ -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);
        }