mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-16 23:53:44 +00:00
make the container exit code propagate to lxc-start exit code when appropriate
Signed-off-by: Rodrigo Sampaio Vaz <rodrigo@heroku.com> Acked-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
parent
9a7c2aba46
commit
d4ef230cc9
@ -336,6 +336,9 @@ int main(int argc, char *argv[])
|
|||||||
ERROR("To get more details, run the container in foreground mode.");
|
ERROR("To get more details, run the container in foreground mode.");
|
||||||
ERROR("Additional information can be obtained by setting the "
|
ERROR("Additional information can be obtained by setting the "
|
||||||
"--logfile and --log-priority options.");
|
"--logfile and --log-priority options.");
|
||||||
|
err = c->error_num;
|
||||||
|
lxc_container_put(c);
|
||||||
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
@ -673,6 +673,7 @@ static bool lxcapi_start(struct lxc_container *c, int useinit, char * const argv
|
|||||||
reboot:
|
reboot:
|
||||||
conf->reboot = 0;
|
conf->reboot = 0;
|
||||||
ret = lxc_start(c->name, argv, conf, c->config_path);
|
ret = lxc_start(c->name, argv, conf, c->config_path);
|
||||||
|
c->error_num = ret;
|
||||||
|
|
||||||
if (conf->reboot) {
|
if (conf->reboot) {
|
||||||
INFO("container requested reboot");
|
INFO("container requested reboot");
|
||||||
|
Loading…
Reference in New Issue
Block a user