User-Mode Linux does not do VT102 emulation, and $ systemd-vconsole-setup /dev/tty0
will always fail on it. In order to prevent vconsole-setup.service from always failing, write an exception for it in vconsole-setup.c. Now, vconsole-setup.service will pass on um Linux, and the logs will indicate that /dev/tty0 is not a virtual console. Cc: Kay Sievers <k...@vrfy.org> Cc: Zbigniew Jędrzejewski-Szmek <zbys...@in.waw.pl> Cc: Lennart Poettering <lenn...@poettering.net> Signed-off-by: Ramkumar Ramachandra <artag...@gmail.com> --- I didn't cut corners: I built it with abs, and tested it properly :) Kay: You like this? src/vconsole/vconsole-setup.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c index 1bbf737..bffc632 100644 --- a/src/vconsole/vconsole-setup.c +++ b/src/vconsole/vconsole-setup.c @@ -224,6 +224,7 @@ int main(int argc, char **argv) { pid_t font_pid = 0, keymap_pid = 0; bool font_copy = false; int r = EXIT_FAILURE; + const char *id = NULL; log_set_target(LOG_TARGET_AUTO); log_parse_environment(); @@ -245,6 +246,10 @@ int main(int argc, char **argv) { } if (!is_vconsole(fd)) { + /* uml does not do VT102 emulation */ + if (detect_vm(&id) > 0 && !strcmp(id, "uml")) + r = EXIT_SUCCESS; + log_error("Device %s is not a virtual console.", vc); goto finish; } -- 1.8.3.3.820.ge3d4493.dirty _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel