diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-05-14 19:13:03 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2020-05-15 16:05:33 +0200 |
commit | a0b191b705ff4bcc4f7b49aec060dfa713e2325a (patch) | |
tree | 70042eed4cf2cb95c22ddb350515cf61f7034a41 /src/network/netdev | |
parent | 7cd9e4f8a087caa38acb5c7b0c41d38e82cf4d80 (diff) | |
download | systemd-a0b191b705ff4bcc4f7b49aec060dfa713e2325a.tar.gz |
condition: add ConditionEnvironment=
Prompted by the discussions in #15180.
This is a bit more complex than I hoped, since for PID 1 we need to pass
in the synethetic environment block in we generate on demand.
Diffstat (limited to 'src/network/netdev')
-rw-r--r-- | src/network/netdev/netdev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c index bc85d4babb..997dafa719 100644 --- a/src/network/netdev/netdev.c +++ b/src/network/netdev/netdev.c @@ -2,6 +2,7 @@ #include <net/if.h> #include <netinet/in.h> +#include <unistd.h> #include "alloc-util.h" #include "bond.h" @@ -693,7 +694,7 @@ int netdev_load_one(Manager *manager, const char *filename) { return r; /* skip out early if configuration does not match the environment */ - if (!condition_test_list(netdev_raw->conditions, NULL, NULL, NULL)) { + if (!condition_test_list(netdev_raw->conditions, environ, NULL, NULL, NULL)) { log_debug("%s: Conditions in the file do not match the system environment, skipping.", filename); return 0; } |