diff --git a/doc/config.md b/doc/config.md index a4abc3c0..dbce328e 100644 --- a/doc/config.md +++ b/doc/config.md @@ -207,10 +207,12 @@ and any `*.conf`, was added. It is worth noting that these are global and *shared with all* services -- the only way to have service-local environment is detailed in the next section. -The syntax for global environment variables is straight forward: +The syntax for global environment variables is straight forward. In +Finit v4.4 the `set` keyword was added for completeness, but the old +syntax (without the `set ` prefix) is still honored: - foo=bar - baz="qux" + set foo=bar + set baz="qux" On reload of .conf files, all tracked environment variables are cleared so if `foo=bar` is removed from `finit.conf`, or any `finit.d/*.conf` diff --git a/src/conf.c b/src/conf.c index 56eabdef..1ac5af20 100644 --- a/src/conf.c +++ b/src/conf.c @@ -708,6 +708,11 @@ static int parse_static(char *line, int is_rcsd) return 0; } + if (BOOTSTRAP && MATCH_CMD(line, "set ", x)) { + parse_env(x); + return 0; + } + if (MATCH_CMD(line, "include ", x)) { char *file = strip_line(x);