mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-27 12:28:27 +00:00
tools: set configfile after load_config
In order to cause c->is_defined() to become true. Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
50b737a3c6
commit
6118210e0a
@ -385,6 +385,12 @@ int main(int argc, char *argv[])
|
||||
lxc_container_put(c);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
c->configfile = strdup(my_args.rcfile);
|
||||
if (!c->configfile) {
|
||||
ERROR("Out of memory setting new config filename");
|
||||
lxc_container_put(c);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
if (!c->may_control(c)) {
|
||||
|
@ -92,6 +92,12 @@ int main(int argc, char *argv[])
|
||||
lxc_container_put(c);
|
||||
return 1;
|
||||
}
|
||||
c->configfile = strdup(my_args.rcfile);
|
||||
if (!c->configfile) {
|
||||
ERROR("Out of memory setting new config filename");
|
||||
lxc_container_put(c);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!c->may_control(c)) {
|
||||
|
@ -222,6 +222,12 @@ int main(int argc, char *argv[])
|
||||
lxc_container_put(c);
|
||||
exit(1);
|
||||
}
|
||||
c->configfile = strdup(my_args.rcfile);
|
||||
if (!c->configfile) {
|
||||
fprintf(stderr, "Out of memory setting new config filename\n");
|
||||
lxc_container_put(c);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (!c->may_control(c)) {
|
||||
|
@ -120,6 +120,12 @@ int main(int argc, char *argv[])
|
||||
lxc_container_put(c);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
c->configfile = strdup(my_args.rcfile);
|
||||
if (!c->configfile) {
|
||||
fprintf(stderr, "Out of memory setting new config filename\n");
|
||||
lxc_container_put(c);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
if (!c->may_control(c)) {
|
||||
|
@ -217,6 +217,11 @@ int main(int argc, char *argv[])
|
||||
fprintf(stderr, "Failed to load rcfile\n");
|
||||
goto out;
|
||||
}
|
||||
c->configfile = strdup(my_args.rcfile);
|
||||
if (!c->configfile) {
|
||||
fprintf(stderr, "Out of memory setting new config filename\n");
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
if (!c->may_control(c)) {
|
||||
|
@ -96,6 +96,12 @@ int main(int argc, char *argv[])
|
||||
lxc_container_put(c);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
c->configfile = strdup(my_args.rcfile);
|
||||
if (!c->configfile) {
|
||||
fprintf(stderr, "Out of memory setting new config filename\n");
|
||||
lxc_container_put(c);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
if (!c->may_control(c)) {
|
||||
|
@ -132,6 +132,11 @@ int main(int argc, char *argv[])
|
||||
ERROR("Failed to load rcfile");
|
||||
goto err1;
|
||||
}
|
||||
c->configfile = strdup(my_args.rcfile);
|
||||
if (!c->configfile) {
|
||||
ERROR("Out of memory setting new config filename");
|
||||
goto err1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!c->is_running(c)) {
|
||||
|
@ -82,6 +82,12 @@ int main(int argc, char *argv[])
|
||||
lxc_container_put(c);
|
||||
exit(1);
|
||||
}
|
||||
c->configfile = strdup(my_args.rcfile);
|
||||
if (!c->configfile) {
|
||||
ERROR("Out of memory setting new config filename");
|
||||
lxc_container_put(c);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (!c->may_control(c)) {
|
||||
|
@ -303,6 +303,12 @@ static int print_info(const char *name, const char *lxcpath)
|
||||
lxc_container_put(c);
|
||||
return -1;
|
||||
}
|
||||
c->configfile = strdup(my_args.rcfile);
|
||||
if (!c->configfile) {
|
||||
fprintf(stderr, "Out of memory setting new config filename\n");
|
||||
lxc_container_put(c);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!c->may_control(c)) {
|
||||
|
@ -115,6 +115,12 @@ int main(int argc, char *argv[])
|
||||
lxc_container_put(c);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
c->configfile = strdup(my_args.rcfile);
|
||||
if (!c->configfile) {
|
||||
fprintf(stderr, "Out of memory setting new config filename\n");
|
||||
lxc_container_put(c);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
if (!c->may_control(c)) {
|
||||
|
@ -210,6 +210,11 @@ int main(int argc, char *argv[])
|
||||
fprintf(stderr, "Failed to load rcfile\n");
|
||||
goto out;
|
||||
}
|
||||
c->configfile = strdup(my_args.rcfile);
|
||||
if (!c->configfile) {
|
||||
fprintf(stderr, "Out of memory setting new config filename\n");
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
if (!c->may_control(c)) {
|
||||
|
@ -86,6 +86,12 @@ int main(int argc, char *argv[])
|
||||
lxc_container_put(c);
|
||||
exit(1);
|
||||
}
|
||||
c->configfile = strdup(my_args.rcfile);
|
||||
if (!c->configfile) {
|
||||
ERROR("Out of memory setting new config filename");
|
||||
lxc_container_put(c);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (!c->unfreeze(c)) {
|
||||
|
@ -112,6 +112,12 @@ int main(int argc, char *argv[])
|
||||
lxc_container_put(c);
|
||||
return 1;
|
||||
}
|
||||
c->configfile = strdup(my_args.rcfile);
|
||||
if (!c->configfile) {
|
||||
fprintf(stderr, "Out of memory setting new config filename\n");
|
||||
lxc_container_put(c);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!c->wait(c, my_args.states, my_args.timeout)) {
|
||||
|
Loading…
Reference in New Issue
Block a user