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.
This commit is contained in:
parent
0e168acbd6
commit
a705d08519
|
@ -131,7 +131,7 @@ int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
/* Automatically add in a serial getty on the kernel
|
/* Automatically add in a serial getty on the kernel
|
||||||
* console */
|
* console */
|
||||||
if (tty_is_vc(tty))
|
if (isempty(tty) || tty_is_vc(tty))
|
||||||
free(active);
|
free(active);
|
||||||
else {
|
else {
|
||||||
int k;
|
int k;
|
||||||
|
|
Loading…
Reference in New Issue