chiark / gitweb /
getty: automatically spawn getty on xen console xvc0
[elogind.git] / src / getty-generator.c
index 683775a4d50615be3af32159ef01aa478a06115d..141402bd15b8f6b08f741fe0a06a5b53731fde59 100644 (file)
@@ -119,6 +119,14 @@ int main(int argc, char *argv[]) {
 
                 if (add_symlink("serial-getty@.service", "serial-getty@hvc0.service") < 0)
                         r = EXIT_FAILURE;
+
+        }
+
+        if (access("/sys/class/tty/xvc0", F_OK) == 0) {
+                log_debug("Automatic adding serial getty for xvc0.");
+
+                if (add_symlink("serial-getty@.service", "serial-getty@xvc0.service") < 0)
+                        r = EXIT_FAILURE;
         }
 
 finish: