From d3d3fd0b8214c950e6a8ddffbf5385aa8c0efb4b Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Mon, 25 Dec 2017 01:52:33 +0100 Subject: [PATCH] tools: honor --console and --console-log Signed-off-by: Christian Brauner --- src/lxc/tools/lxc_start.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/lxc/tools/lxc_start.c b/src/lxc/tools/lxc_start.c index eeb14e291..694627297 100644 --- a/src/lxc/tools/lxc_start.c +++ b/src/lxc/tools/lxc_start.c @@ -192,7 +192,7 @@ Options :\n\ int main(int argc, char *argv[]) { - int err = EXIT_FAILURE; + int i, err = EXIT_FAILURE; struct lxc_conf *conf; struct lxc_log log; char *const *args; @@ -320,7 +320,14 @@ int main(int argc, char *argv[]) } } - int i; + if (my_args.console) + if (!c->set_config_item(c, "lxc.console.path", my_args.console)) + goto out; + + if (my_args.console_log) + if (!c->set_config_item(c, "lxc.console.logfile", my_args.console_log)) + goto out; + for (i = 0; i < LXC_NS_MAX; i++) { if (my_args.share_ns[i] == NULL) continue; -- 2.47.2