Commit dad87e3b by Stéphane Graber

Drop usage of LXC_DEFAULT_CONFIG in our code

parent 593e8478
...@@ -229,7 +229,7 @@ int main(int argc, char *argv[]) ...@@ -229,7 +229,7 @@ int main(int argc, char *argv[])
if (my_args.configfile) if (my_args.configfile)
c->load_config(c, my_args.configfile); c->load_config(c, my_args.configfile);
else else
c->load_config(c, LXC_DEFAULT_CONFIG); c->load_config(c, lxc_global_config_value("lxc.default_config"));
if (my_args.fstype) if (my_args.fstype)
spec.fstype = my_args.fstype; spec.fstype = my_args.fstype;
......
...@@ -1186,8 +1186,8 @@ static bool lxcapi_create(struct lxc_container *c, const char *t, ...@@ -1186,8 +1186,8 @@ static bool lxcapi_create(struct lxc_container *c, const char *t,
} }
if (!c->lxc_conf) { if (!c->lxc_conf) {
if (!c->load_config(c, LXC_DEFAULT_CONFIG)) { if (!c->load_config(c, lxc_global_config_value("lxc.default_config"))) {
ERROR("Error loading default configuration file %s\n", LXC_DEFAULT_CONFIG); ERROR("Error loading default configuration file %s\n", lxc_global_config_value("lxc.default_config"));
goto free_tpath; goto free_tpath;
} }
} }
...@@ -1658,8 +1658,8 @@ static bool lxcapi_save_config(struct lxc_container *c, const char *alt_file) ...@@ -1658,8 +1658,8 @@ static bool lxcapi_save_config(struct lxc_container *c, const char *alt_file)
// If we haven't yet loaded a config, load the stock config // If we haven't yet loaded a config, load the stock config
if (!c->lxc_conf) { if (!c->lxc_conf) {
if (!c->load_config(c, LXC_DEFAULT_CONFIG)) { if (!c->load_config(c, lxc_global_config_value("lxc.default_config"))) {
ERROR("Error loading default configuration file %s while saving %s\n", LXC_DEFAULT_CONFIG, c->name); ERROR("Error loading default configuration file %s while saving %s\n", lxc_global_config_value("lxc.default_config"), c->name);
return false; return false;
} }
} }
......
...@@ -72,7 +72,7 @@ static int create_busybox(void) ...@@ -72,7 +72,7 @@ static int create_busybox(void)
return -1; return -1;
} }
if (pid == 0) { if (pid == 0) {
ret = execlp("lxc-create", "lxc-create", "-t", "busybox", "-f", LXC_DEFAULT_CONFIG, "-n", MYNAME, NULL); ret = execlp("lxc-create", "lxc-create", "-t", "busybox", "-n", MYNAME, NULL);
// Should not return // Should not return
perror("execl"); perror("execl");
exit(1); exit(1);
......
...@@ -38,7 +38,7 @@ static int create_ubuntu(void) ...@@ -38,7 +38,7 @@ static int create_ubuntu(void)
return -1; return -1;
} }
if (pid == 0) { if (pid == 0) {
ret = execlp("lxc-create", "lxc-create", "-t", "ubuntu", "-f", LXC_DEFAULT_CONFIG, "-n", MYNAME, NULL); ret = execlp("lxc-create", "lxc-create", "-t", "ubuntu", "-n", MYNAME, NULL);
// Should not return // Should not return
perror("execl"); perror("execl");
exit(1); exit(1);
......
...@@ -38,7 +38,7 @@ static int create_ubuntu(void) ...@@ -38,7 +38,7 @@ static int create_ubuntu(void)
return -1; return -1;
} }
if (pid == 0) { if (pid == 0) {
ret = execlp("lxc-create", "lxc-create", "-t", "ubuntu", "-f", LXC_DEFAULT_CONFIG, "-n", MYNAME, NULL); ret = execlp("lxc-create", "lxc-create", "-t", "ubuntu", "-n", MYNAME, NULL);
// Should not return // Should not return
perror("execl"); perror("execl");
exit(1); exit(1);
......
...@@ -71,7 +71,7 @@ static int create_ubuntu(void) ...@@ -71,7 +71,7 @@ static int create_ubuntu(void)
return -1; return -1;
} }
if (pid == 0) { if (pid == 0) {
ret = execlp("lxc-create", "lxc-create", "-t", "ubuntu", "-f", LXC_DEFAULT_CONFIG, "-n", MYNAME, NULL); ret = execlp("lxc-create", "lxc-create", "-t", "ubuntu", "-n", MYNAME, NULL);
// Should not return // Should not return
perror("execl"); perror("execl");
exit(1); exit(1);
......
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