diff options
author | Quentin Young <qlyoung@nvidia.com> | 2020-11-30 23:37:18 +0100 |
---|---|---|
committer | Quentin Young <qlyoung@nvidia.com> | 2020-12-02 00:37:14 +0100 |
commit | e4e0229aba2b90d93bf681cc4e309c93f7cff61f (patch) | |
tree | 3885492f543d13ae42dbe47b83fe3a5b38368027 /lib/frrscript.h | |
parent | build: HAVE_LUA -> HAVE_SCRIPTING (diff) | |
download | frr-e4e0229aba2b90d93bf681cc4e309c93f7cff61f.tar.xz frr-e4e0229aba2b90d93bf681cc4e309c93f7cff61f.zip |
lib: add support for scripts directory
Specify default via --with-scriptdir at compile time, override default
with --scriptdir at runtime. If unspecified, it's {sysconfdir}/scripts
(usually /etc/frr/scripts)
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
Diffstat (limited to 'lib/frrscript.h')
-rw-r--r-- | lib/frrscript.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/frrscript.h b/lib/frrscript.h index 4206420f4..f4057f531 100644 --- a/lib/frrscript.h +++ b/lib/frrscript.h @@ -30,8 +30,6 @@ extern "C" { #endif -#define FRRSCRIPT_PATH "/etc/frr/scripts" - typedef void (*encoder_func)(lua_State *, const void *); typedef void *(*decoder_func)(lua_State *, int); @@ -92,8 +90,11 @@ void frrscript_register_type_codecs(struct frrscript_codec *codecs); /* * Initialize scripting subsystem. Call this before anything else. + * + * scriptdir + * Directory in which to look for scripts */ -void frrscript_init(void); +void frrscript_init(const char *scriptdir); /* |