summaryrefslogtreecommitdiff
path: root/src/getty-generator/getty-generator.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2012-12-02 18:06:35 +0100
committerKay Sievers <kay@vrfy.org>2012-12-02 18:18:27 +0100
commita705d08519d26cd2ee581cd04cb70888b3a55b62 (patch)
tree392372565bc0b2823b8db640585097a8997f8866 /src/getty-generator/getty-generator.c
parent0e168acbd69dd0d0a776a8cc20c5a5cb6a804325 (diff)
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.
Diffstat (limited to 'src/getty-generator/getty-generator.c')
-rw-r--r--src/getty-generator/getty-generator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/getty-generator/getty-generator.c b/src/getty-generator/getty-generator.c
index 1cef6aeae9..cb38f21052 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;