tools: fix lxc-create with global config value

parent 460babdb
......@@ -268,9 +268,12 @@ int main(int argc, char *argv[])
}
if (geteuid()) {
if (mkdir_p(my_args.lxcpath[0], 0755)) {
if (!my_args.lxcpath[0])
my_args.lxcpath[0] = lxc_get_global_config_item("lxc.lxcpath");
if (mkdir_p(my_args.lxcpath[0], 0755))
exit(EXIT_FAILURE);
}
if (access(my_args.lxcpath[0], O_RDONLY) < 0) {
fprintf(stderr, "You lack access to %s\n", my_args.lxcpath[0]);
exit(EXIT_FAILURE);
......
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