In its default configuration, um Linux connects its /dev/console to the host's fd:0,fd:1. Other tty devices (/dev/tty*) are accessible on various host devices that the user must connect to explicitly. By running getty on /dev/console by default,
$ ./linux ubd0=arch-rootfs will display a prompt immediately on the same terminal, along with the boot messages. This is much more user-friendly, than making the user explicitly connect to the right device using $ screen /dev/pts/8 to get a login prompt. Cc: Thomas Bächler <[email protected]> Cc: Lennart Poettering <[email protected]> Signed-off-by: Ramkumar Ramachandra <[email protected]> --- src/getty-generator/getty-generator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/getty-generator/getty-generator.c b/src/getty-generator/getty-generator.c index 4b7a60a..9c7ed1a 100644 --- a/src/getty-generator/getty-generator.c +++ b/src/getty-generator/getty-generator.c @@ -96,6 +96,7 @@ int main(int argc, char *argv[]) { int r = EXIT_SUCCESS; char *active; const char *j; + const char *id = NULL; if (argc > 1 && argc != 4) { log_error("This program takes three or no arguments."); @@ -111,7 +112,7 @@ int main(int argc, char *argv[]) { umask(0022); - if (detect_container(NULL) > 0) { + if (detect_container(NULL) > 0 || (detect_vm(&id) > 0 && !strcmp(id, "uml"))) { log_debug("Automatically adding console shell."); if (add_symlink("console-getty.service", "console-getty.service") < 0) -- 1.8.3.3.797.gb72c616.dirty _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
