]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
tools: honor --console and --console-log
authorChristian Brauner <christian.brauner@ubuntu.com>
Mon, 25 Dec 2017 00:52:33 +0000 (01:52 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Fri, 19 Jan 2018 14:06:03 +0000 (15:06 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/tools/lxc_start.c

index eeb14e2911faf3a70534f50f27337dc9f5c5698e..694627297b86ed60ee64bfba74f59b9cce89b4af 100644 (file)
@@ -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;