<listitem>
<para>
Specify a path to a file where the console output will
- be written.
+ be written. The keyword 'none' will simply disable the
+ console. This is dangerous once if have a rootfs with a
+ console device file where the application can write, the
+ messages will fall in the host.
</para>
</listitem>
</varlistentry>
return -1;
}
+ if (!strcmp(console->path, "none"))
+ return 0;
+
if (openpty(&console->master, &console->slave,
console->name, NULL, NULL)) {
SYSERROR("failed to allocate a pty");
return 0;
}
+ if (console->peer == -1) {
+ INFO("no console will be used");
+ return 0;
+ }
+
if (lxc_mainloop_add_handler(descr, console->master,
console_handler, console)) {
ERROR("failed to add to mainloop console handler for '%d'",