summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-09-10 14:32:19 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-09-16 10:32:03 -0400
commit2cc34d5b91684256530242b94bf6ea1f27ffa7a9 (patch)
tree984997cf5cba3cb3ecf1cb423ae221d13fde0336
parent23bb31aa0a3ef7509dc5200518517d1297530534 (diff)
networkd: support drop-in dirs for .network files
-rw-r--r--src/network/networkd-netdev.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/network/networkd-netdev.c b/src/network/networkd-netdev.c
index e7edc366af..9cf678a3ef 100644
--- a/src/network/networkd-netdev.c
+++ b/src/network/networkd-netdev.c
@@ -577,6 +577,7 @@ static int netdev_load_one(Manager *manager, const char *filename) {
_cleanup_netdev_unref_ NetDev *netdev = NULL;
_cleanup_free_ NetDev *netdev_raw = NULL;
_cleanup_fclose_ FILE *file = NULL;
+ const char *dropin_dirname;
int r;
assert(manager);
@@ -600,11 +601,12 @@ static int netdev_load_one(Manager *manager, const char *filename) {
return log_oom();
netdev_raw->kind = _NETDEV_KIND_INVALID;
+ dropin_dirname = strjoina(basename(filename), ".d");
- r = config_parse(NULL, filename, file,
- "Match\0NetDev\0",
- config_item_perf_lookup, network_netdev_gperf_lookup,
- true, false, true, netdev_raw);
+ r = config_parse_many(filename, network_dirs, dropin_dirname,
+ "Match\0NetDev\0",
+ config_item_perf_lookup, network_netdev_gperf_lookup,
+ true, netdev_raw);
if (r < 0)
return r;