aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-technologies.net>2010-12-28 21:32:51 +0100
committerDaniel Lezcano <dlezcano@fr.ibm.com>2010-12-28 21:32:51 +0100
commit4e0eb76555a8365da02dff70a03355a7562b1ead (patch)
treeb56642c0af65fbb8e951b260f77ab4e715a44ede
parentSetting default mirror to cdn.debian.net in debian template. (diff)
downloadlxc-4e0eb76555a8365da02dff70a03355a7562b1ead.tar.gz
lxc-4e0eb76555a8365da02dff70a03355a7562b1ead.tar.bz2
lxc-4e0eb76555a8365da02dff70a03355a7562b1ead.zip
Creating missing tty device nodes for squeeze in debian template.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
-rw-r--r--templates/lxc-debian.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/templates/lxc-debian.in b/templates/lxc-debian.in
index 8ec0c29..d5663a2 100644
--- a/templates/lxc-debian.in
+++ b/templates/lxc-debian.in
@@ -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: