chiark / gitweb /
getty: automatically spawn getty on xen console xvc0
authorLennart Poettering <lennart@poettering.net>
Mon, 1 Aug 2011 18:27:57 +0000 (20:27 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 1 Aug 2011 18:28:01 +0000 (20:28 +0200)
https://bugzilla.redhat.com/show_bug.cgi?id=726976

src/99-systemd.rules.in
src/getty-generator.c

index e0aa49d..6aaf827 100644 (file)
@@ -8,7 +8,7 @@
 ACTION=="remove", GOTO="systemd_end"
 
 SUBSYSTEM=="tty", KERNEL=="tty[0-9]|tty1[0-2]", TAG+="systemd"
-SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*", TAG+="systemd"
+SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*", TAG+="systemd"
 
 KERNEL=="vport*", TAG+="systemd"
 
index 683775a..141402b 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: