Unverified Commit 78598e2b by Christian Brauner Committed by GitHub

Merge pull request #3896 from Blub/include-userns-config-dir

RFC: conf: userns.conf: include userns.conf.d
parents 483f5b4f dc73e0f0
......@@ -19,3 +19,6 @@ lxc.tty.dir =
# Setup the default mounts
lxc.mount.auto = sys:rw
# Lastly, include all the configs from @LXCTEMPLATECONFIG@/userns.conf.d/
lxc.include = @LXCTEMPLATECONFIG@/userns.conf.d/
......@@ -2689,7 +2689,7 @@ static int do_includedir(const char *dirp, struct lxc_conf *lxc_conf)
dir = opendir(dirp);
if (!dir)
return -errno;
return errno == ENOENT ? 0 : -errno;
while ((direntp = readdir(dir))) {
const char *fnam;
......@@ -2726,7 +2726,7 @@ static int set_config_includefiles(const char *key, const char *value,
return 0;
}
if (is_dir(value))
if (value[strlen(value)-1] == '/' || is_dir(value))
return do_includedir(value, lxc_conf);
return lxc_config_read(value, lxc_conf, true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment