mirror of
https://github.com/zeek/zeek.git
synced 2025-10-15 04:58:21 +00:00
Expand Supervisor to support loading additional scripts before user scripts
In supervised nodes, the Supervisor's NodeConfig$scripts vector adds scripts to the end of the user-provided scripts (options.scripts_to_load), so they load _after_ any user-provided ones. This can cause confusing redef pitfalls when users expect their customizations to run last, as they normally do. This adds two members in Supervisor::NodeConfig, `addl_base_scripts` and `addl_user_scripts`, to store scripts to load before and after the user scripts, respectively. The latter serves the same purpose as the old `scripts` member, which is still there but deprecated (in scriptland only). It functions as before, after any scripts added via `addl_user_scripts`.
This commit is contained in:
parent
61c001a57e
commit
c7860e3238
5 changed files with 107 additions and 12 deletions
|
@ -198,9 +198,20 @@ public:
|
|||
*/
|
||||
std::optional<bool> bare_mode;
|
||||
/**
|
||||
* Additional script filename/paths that the node should load.
|
||||
* Additional script filenames/paths that the node should load
|
||||
* after the base scripts, and prior to any user-specified ones.
|
||||
*/
|
||||
std::vector<std::string> scripts;
|
||||
std::vector<std::string> addl_base_scripts;
|
||||
/**
|
||||
* Additional script filename/paths that the node should load
|
||||
* after any user-specified scripts.
|
||||
*/
|
||||
std::vector<std::string> addl_user_scripts;
|
||||
/**
|
||||
* The former name for addl_user_scripts, now deprecated.
|
||||
*/
|
||||
std::vector<std::string> scripts
|
||||
[[deprecated("Remove in v6.1. Use NodeConfig::addl_user_scripts.")]];
|
||||
/**
|
||||
* Environment variables and values to define in the node.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue