diff options
Diffstat (limited to 'lib/command.c')
| -rw-r--r-- | lib/command.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/command.c b/lib/command.c index 87110157f6..99f86ec680 100644 --- a/lib/command.c +++ b/lib/command.c @@ -2279,6 +2279,22 @@ done: return CMD_SUCCESS; } +#ifdef DEV_BUILD +DEFUN(script, + script_cmd, + "script SCRIPT", + "Test command - execute a script\n" + "Script name (same as filename in /etc/frr/scripts/\n") +{ + struct frrscript *fs = frrscript_load(argv[2]->arg, NULL); + int ret = frrscript_call(fs, 42); + + vty_out(vty, "Script result: %d\n", ret); + + return CMD_SUCCESS; +} +#endif + /* Set config filename. Called from vty.c */ void host_config_set(const char *filename) { |
