[systemd-commits] src/99-systemd.rules.in src/getty-generator.c
Lennart Poettering
lennart at kemper.freedesktop.org
Mon Aug 1 11:28:37 PDT 2011
src/99-systemd.rules.in | 2 +-
src/getty-generator.c | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletion(-)
New commits:
commit 980fc73d1fcda8c2a494a18dbd3262fdb97f5fbe
Author: Lennart Poettering <lennart at poettering.net>
Date: Mon Aug 1 20:27:57 2011 +0200
getty: automatically spawn getty on xen console xvc0
https://bugzilla.redhat.com/show_bug.cgi?id=726976
diff --git a/src/99-systemd.rules.in b/src/99-systemd.rules.in
index e0aa49d..6aaf827 100644
--- a/src/99-systemd.rules.in
+++ b/src/99-systemd.rules.in
@@ -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"
diff --git a/src/getty-generator.c b/src/getty-generator.c
index 683775a..141402b 100644
--- a/src/getty-generator.c
+++ b/src/getty-generator.c
@@ -119,6 +119,14 @@ int main(int argc, char *argv[]) {
if (add_symlink("serial-getty at .service", "serial-getty at 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 at .service", "serial-getty at xvc0.service") < 0)
+ r = EXIT_FAILURE;
}
finish:
More information about the systemd-commits
mailing list