mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-27 16:18:16 +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);
|
lxc_container_put(c);
|
||||||
exit(EXIT_FAILURE);
|
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)) {
|
if (!c->may_control(c)) {
|
||||||
|
@ -92,6 +92,12 @@ int main(int argc, char *argv[])
|
|||||||
lxc_container_put(c);
|
lxc_container_put(c);
|
||||||
return 1;
|
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)) {
|
if (!c->may_control(c)) {
|
||||||
|
@ -222,6 +222,12 @@ int main(int argc, char *argv[])
|
|||||||
lxc_container_put(c);
|
lxc_container_put(c);
|
||||||
exit(1);
|
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)) {
|
if (!c->may_control(c)) {
|
||||||
|
@ -120,6 +120,12 @@ int main(int argc, char *argv[])
|
|||||||
lxc_container_put(c);
|
lxc_container_put(c);
|
||||||
exit(EXIT_FAILURE);
|
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)) {
|
if (!c->may_control(c)) {
|
||||||
|
@ -217,6 +217,11 @@ int main(int argc, char *argv[])
|
|||||||
fprintf(stderr, "Failed to load rcfile\n");
|
fprintf(stderr, "Failed to load rcfile\n");
|
||||||
goto out;
|
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)) {
|
if (!c->may_control(c)) {
|
||||||
|
@ -96,6 +96,12 @@ int main(int argc, char *argv[])
|
|||||||
lxc_container_put(c);
|
lxc_container_put(c);
|
||||||
exit(EXIT_FAILURE);
|
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)) {
|
if (!c->may_control(c)) {
|
||||||
|
@ -132,6 +132,11 @@ int main(int argc, char *argv[])
|
|||||||
ERROR("Failed to load rcfile");
|
ERROR("Failed to load rcfile");
|
||||||
goto err1;
|
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)) {
|
if (!c->is_running(c)) {
|
||||||
|
@ -82,6 +82,12 @@ int main(int argc, char *argv[])
|
|||||||
lxc_container_put(c);
|
lxc_container_put(c);
|
||||||
exit(1);
|
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)) {
|
if (!c->may_control(c)) {
|
||||||
|
@ -303,6 +303,12 @@ static int print_info(const char *name, const char *lxcpath)
|
|||||||
lxc_container_put(c);
|
lxc_container_put(c);
|
||||||
return -1;
|
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)) {
|
if (!c->may_control(c)) {
|
||||||
|
@ -115,6 +115,12 @@ int main(int argc, char *argv[])
|
|||||||
lxc_container_put(c);
|
lxc_container_put(c);
|
||||||
exit(EXIT_FAILURE);
|
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)) {
|
if (!c->may_control(c)) {
|
||||||
|
@ -210,6 +210,11 @@ int main(int argc, char *argv[])
|
|||||||
fprintf(stderr, "Failed to load rcfile\n");
|
fprintf(stderr, "Failed to load rcfile\n");
|
||||||
goto out;
|
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)) {
|
if (!c->may_control(c)) {
|
||||||
|
@ -86,6 +86,12 @@ int main(int argc, char *argv[])
|
|||||||
lxc_container_put(c);
|
lxc_container_put(c);
|
||||||
exit(1);
|
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)) {
|
if (!c->unfreeze(c)) {
|
||||||
|
@ -112,6 +112,12 @@ int main(int argc, char *argv[])
|
|||||||
lxc_container_put(c);
|
lxc_container_put(c);
|
||||||
return 1;
|
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)) {
|
if (!c->wait(c, my_args.states, my_args.timeout)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user