[systemd-devel] [PATCH] getty-generator: fix handling systems without a console
David Herrmann
dh.herrmann at googlemail.com
Sun Dec 2 09:06:35 PST 2012
If the system does not have any active console, we should not try to
create an empty symlink. Instead, create no symlink at all.
Otherwise, on systems with CONFIG_VT=n and no serial console, we will
create a symlink with an empty template parameter.
Signed-off-by: David Herrmann <dh.herrmann at googlemail.com>
---
src/getty-generator/getty-generator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/getty-generator/getty-generator.c b/src/getty-generator/getty-generator.c
index 1cef6ae..cb38f21 100644
--- a/src/getty-generator/getty-generator.c
+++ b/src/getty-generator/getty-generator.c
@@ -131,7 +131,7 @@ int main(int argc, char *argv[]) {
/* Automatically add in a serial getty on the kernel
* console */
- if (tty_is_vc(tty))
+ if (isempty(tty) || tty_is_vc(tty))
free(active);
else {
int k;
--
1.8.0.1
More information about the systemd-devel
mailing list