Hi,

please accept the following patch to create missing tty device nodes for squeeze in debian template.

Regards,
Daniel

--
Address:        Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email:          daniel.baum...@progress-technologies.net
Internet:       http://people.progress-technologies.net/~daniel.baumann/

>From bc8854a89ea58431401a7a96723e556c5284af79 Mon Sep 17 00:00:00 2001
From: Daniel Baumann <daniel.baum...@progress-technologies.net>
Date: Mon, 13 Dec 2010 23:07:10 +0100
Subject: [PATCH 3/4] Creating missing tty device nodes for squeeze in debian template.

---
 templates/lxc-debian.in |    8 ++++++++
 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:
-- 
1.7.2.3


------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel

Reply via email to