From a7cb3e520a86b44cb6e1bdfdf6df24856274e0e3 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 8 Mar 2024 09:33:17 +0100 Subject: global-config: support loading snippets This adds support for loading snippets, which need a name starting with "global-config-overlay.d/". This allows to split off configuration if desired. --- global-config.rsc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'global-config.rsc') diff --git a/global-config.rsc b/global-config.rsc index 983eedb..85731c3 100644 --- a/global-config.rsc +++ b/global-config.rsc @@ -250,3 +250,13 @@ } on-error={ :log error ("Loading configuration from overlay failed!"); } + +# configuration overlay snippets +:foreach Script in=[ /system/script/find where name ~ "^global-config-overlay.d/" ] do={ + :do { + /system/script/run $Script; + } on-error={ + :log error ("Loading configuration from overlay snippet " . \ + [ /system/script/get $Script name ] . " failed!"); + } +} -- cgit v1.2.3-54-g00ecf