From: David Herrmann Date: Sun, 2 Dec 2012 17:06:35 +0000 (+0100) Subject: getty-generator: fix handling systems without a console X-Git-Tag: v197~155 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;ds=sidebyside;h=a705d08519d26cd2ee581cd04cb70888b3a55b62;p=elogind.git getty-generator: fix handling systems without a console 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. --- diff --git a/src/getty-generator/getty-generator.c b/src/getty-generator/getty-generator.c index 1cef6aeae..cb38f2105 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;