Create ptmx as a device
Create ptmx as a device

Hi,

I'm seeing an issue with udev and libvirt-lxc.  Libvirt-lxc creates
/dev/ptmx as a symlink to /dev/pts/ptmx.  When udev starts up, it
checks the device type, sees ptmx is 'not right', and replaces it
with a 'proper' ptmx.

In lxc, /dev/ptmx is bind-mounted from /dev/pts/ptmx instead of being
symlinked, so udev sees the right device type and leaves it alone.

A patch like the following seems to work for me.  Would there be
any objections to this?

>From 4c5035de52de7e06a0de9c5d0bab8c87a806cba7 Mon Sep 17 00:00:00 2001
From: Ubuntu <ubuntu@domU-12-31-39-14-F0-B3.compute-1.internal>
Date: Wed, 31 Aug 2011 18:15:54 +0000
Subject: [PATCH 1/1] make ptmx a bind mount rather than symlink

udev on some systems checks the device type of /dev/ptmx, and replaces it if
not as expected.  The symlink created by libvirt-lxc therefore gets replaced.
By creating it as a bind mount, the device type is correct and udev leaves it
alone.

Signed-off-by: Serge Hallyn <3df611b026e4639bee8aef7a4beb2e39fcebb313@canonical.com>

rmarwaha/libvirt1,novel/fbsd-libvirt,shugaoye/libvirt,warewolf/libvirt,siboulet/libvirt-openvz,kantai/libvirt-vfork,cbosdo/libvirt,elmarco/libvirt,danwent/libvirt-ovs,bjzhang/libvirt,leilihh/libvirt,siboulet/libvirt-openvz,iam-TJ/libvirt,trainstack/libvirt,olafhering/libvirt,bjzhang/libvirt,taget/libvirt,iam-TJ/libvirt,danwent/libvirt-ovs,warewolf/libvirt,leilihh/libvirt,iam-TJ/libvirt,jardasgit/libvirt,olafhering/libvirt,warewolf/libvirt,dumbbell/libvirt,wiedi/libvirt,jardasgit/libvirt,jeckersb/libvirt,fabianfreyer/libvirt,nertpinx/libvirt,emaste/libvirt,eskultety/libvirt,novel/fbsd-libvirt,trainstack/libvirt,rmarwaha/libvirt,andreabolognani/libvirt,siboulet/libvirt-openvz,andreabolognani/libvirt,rmarwaha/libvirt,olafhering/libvirt,warewolf/libvirt,datto/libvirt,jfehlig/libvirt,dumbbell/libvirt,agx/libvirt,wiedi/libvirt,wiedi/libvirt,crobinso/libvirt,kantai/libvirt-vfork,jeckersb/libvirt,zhlcindy/libvirt-1.1.4-maintain,kantai/libvirt-vfork,agx/libvirt,VenkatDatta/libvirt,jardasgit/libvirt,jeckersb/libvirt,dumbbell/libvirt,taget/libvirt,datto/libvirt,warewolf/libvirt,libvirt/libvirt,soulxu/libvirt-xuhj,nertpinx/libvirt,elmarco/libvirt,datto/libvirt,taget/libvirt,leilihh/libvirt,iam-TJ/libvirt,iam-TJ/libvirt,foomango/libvirt,VenkatDatta/libvirt,eskultety/libvirt,bjzhang/libvirt,wiedi/libvirt,jeckersb/libvirt,foomango/libvirt,dumbbell/libvirt,wiedi/libvirt,rmarwaha/libvirt,novel/fbsd-libvirt,datto/libvirt,usc-isi/libvirt,fabianfreyer/libvirt,emaste/libvirt,foomango/libvirt,elmarco/libvirt,taget/libvirt,andreabolognani/libvirt,soulxu/libvirt-xuhj,libvirt/libvirt,cbosdo/libvirt,jardasgit/libvirt,shugaoye/libvirt,rlaager/libvirt,bjzhang/libvirt,rlaager/libvirt,soulxu/libvirt-xuhj,zhlcindy/libvirt-1.1.4-maintain,nertpinx/libvirt,rlaager/libvirt,andreabolognani/libvirt,siboulet/libvirt-openvz,trainstack/libvirt,shugaoye/libvirt,shugaoye/libvirt,rmarwaha/libvirt,fabianfreyer/libvirt,agx/libvirt,rlaager/libvirt,zippy2/libvirt,usc-isi/libvirt,usc-isi/libvirt,agx/libvirt,emaste/libvirt,leilihh/libvirt,andreabolognani/libvirt,novel/fbsd-libvirt,iam-TJ/libvirt,elmarco/libvirt,jardasgit/libvirt,novel/fbsd-libvirt,foomango/libvirt,zippy2/libvirt,zhlcindy/libvirt-1.1.4-maintain,nertpinx/libvirt,agx/libvirt,jfehlig/libvirt,emaste/libvirt,cbosdo/libvirt,olafhering/libvirt,danwent/libvirt-ovs,rmarwaha/libvirt1,dumbbell/libvirt,elmarco/libvirt,jfehlig/libvirt,danwent/libvirt-ovs,jeckersb/libvirt,rmarwaha/libvirt1,cbosdo/libvirt,kantai/libvirt-vfork,usc-isi/libvirt,trainstack/libvirt,novel/fbsd-libvirt,emaste/libvirt,emaste/libvirt,crobinso/libvirt,jeckersb/libvirt,VenkatDatta/libvirt,foomango/libvirt,usc-isi/libvirt,jfehlig/libvirt,siboulet/libvirt-openvz,rmarwaha/libvirt1,rmarwaha/libvirt1,zhlcindy/libvirt-1.1.4-maintain,trainstack/libvirt,novel/fbsd-libvirt,emaste/libvirt,zhlcindy/libvirt-1.1.4-maintain,iam-TJ/libvirt,rmarwaha/libvirt,rmarwaha/libvirt1,wiedi/libvirt,trainstack/libvirt,fabianfreyer/libvirt,fabianfreyer/libvirt,soulxu/libvirt-xuhj,rlaager/libvirt,warewolf/libvirt,leilihh/libvirt,novel/fbsd-libvirt,libvirt/libvirt,taget/libvirt,soulxu/libvirt-xuhj,danwent/libvirt-ovs,cbosdo/libvirt,leilihh/libvirt,zippy2/libvirt,nertpinx/libvirt,bjzhang/libvirt,kantai/libvirt-vfork,eskultety/libvirt,eskultety/libvirt,dumbbell/libvirt,warewolf/libvirt,VenkatDatta/libvirt,eskultety/libvirt,jeckersb/libvirt,libvirt/libvirt,zippy2/libvirt,wiedi/libvirt,crobinso/libvirt,datto/libvirt,novel/fbsd-libvirt,VenkatDatta/libvirt,shugaoye/libvirt,rmarwaha/libvirt,crobinso/libvirt,trainstack/libvirt