]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Creating missing tty device nodes for squeeze in debian template.
authorDaniel Baumann <daniel.baumann@progress-technologies.net>
Tue, 28 Dec 2010 20:32:51 +0000 (21:32 +0100)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Tue, 28 Dec 2010 20:32:51 +0000 (21:32 +0100)
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
templates/lxc-debian.in

index 8ec0c290c07e5b8d2c2d2e4ab6a6d691a938960e..d5663a21e262e34bf0d2248afc86386adcda4770 100644 (file)
@@ -28,6 +28,14 @@ configure_debian()
     rootfs=$1
     hostname=$2
 
+    # squeeze only has /dev/tty and /dev/tty0 by default,
+    # therefore creating missing device nodes for tty1-4.
+    for tty in $(seq 1 4); do
+       if [ ! -e $rootfs/dev/tty$tty ]; then
+           mknod $rootfs/dev/tty$tty c 4 $tty
+       fi
+    done
+
     # configure the inittab
     cat <<EOF > $rootfs/etc/inittab
 id:3:initdefault: