]> git.tuebingen.mpg.de Git - micoforia.git/blobdiff - micoforia.c
Also pre-create /dev/tty.
[micoforia.git] / micoforia.c
index 4d267ec8f56a0912fb897bc930af328142b8420c..6e10a0c8aab3ef96d9710e69100f0b47d965319e 100644 (file)
@@ -890,6 +890,7 @@ static void create_standard_device_nodes(struct container_runtime *cr)
                {.major = 1, .minor = 8, .mode = 0666, .name = "random"},
                {.major = 1, .minor = 9, .mode = 0666, .name = "urandom"},
                {.major = 4, .minor = 0, .mode = 0620, .name = "tty0"},
+               {.major = 5, .minor = 0, .mode = 0666, .name = "tty"},
                {.major = 5, .minor = 1, .mode = 0600, .name = "console"},
                {.major = 5, .minor = 2, .mode = 0666, .name = "ptmx"},
        };
@@ -943,7 +944,7 @@ static void shutdown_console(struct container_runtime *cr)
        char *console;
 
        for (n = 0; n < cr->num_ttys; n++) {
-               char *tty = msg("%s/tty1", cr->dev);
+               char *tty = msg("%s/tty%u", cr->dev, n);
                if (umount2(tty, MNT_DETACH) < 0)
                        DEBUG_LOG("umount %s: %m\n", tty);
                free(tty);