chiark / gitweb /
getty: do not auto-spawn getty's on VC ttys if console=ttyN is used
[elogind.git] / src / target.c
index a73a98987633dc4bef2c4698702a11c7133a8011..73130078d991f57e5547c000f5a7ffef5dea281d 100644 (file)
@@ -91,7 +91,12 @@ static int target_add_getty_dependencies(Target *t) {
 
         /* Automatically add in a serial getty on the kernel
          * console */
-        if (t->meta.manager->console) {
+        if (t->meta.manager->console && !tty_is_vc(t->meta.manager->console)) {
+
+                /* We assume that gettys on virtual terminals are
+                 * started via manual configuration and do this magic
+                 * only for non-VC terminals. */
+
                 log_debug("Automatically adding serial getty for %s", t->meta.manager->console);
                 if (!(n = unit_name_replace_instance(SPECIAL_SERIAL_GETTY_SERVICE, t->meta.manager->console)))
                         return -ENOMEM;