ではコンテナを root で実行して、コンテナ内でlxc.mount = ./fstab
....
/dev/pts /opt/lxc/rootfs/dev/pts none bind 0 0
なんてすると、見事? ホスト側のecho hogehoge > /dev/pts/0
--- /etc/init.d/mountdevsubfs.sh.orig 2009-05-27 21:40:09.000000000 +0900
+++ /etc/init.d/mountdevsubfs.sh 2009-06-01 23:35:42.000000000 +0900
@@ -70,7 +70,7 @@
fi
[ -x /sbin/restorecon ] && /sbin/restorecon /dev/ptmx
fi
- domount devpts "" /dev/pts devpts -onoexec,nosuid,gid=$TTYGRP,mode=$TTYMODE
+ domount devpts "" /dev/pts devpts -onoexec,nosuid,gid=$TTYGRP,mode=$TTYMODE,newinstance,ptmxmode=0666
fi
fi
}
--- /etc/init.d/mtab.sh.orig 2009-06-01 22:25:45.000000000 +0900
+++ /etc/init.d/mtab.sh 2009-06-01 23:18:15.000000000 +0900
@@ -137,7 +137,7 @@
SHM_OPT=
[ "${SHM_SIZE:=$TMPFS_SIZE}" ] && SHM_OPT=",size=$SHM_SIZE"
domtab tmpfs /dev/shm tmpfs -onosuid,nodev$SHM_OPT
- domtab devpts /dev/pts "devpts" -onoexec,nosuid,gid=$TTYGRP,mode=$TTYMODE
+ domtab devpts /dev/pts "devpts" -onoexec,nosuid,gid=$TTYGRP,mode=$TTYMODE,newinstance,ptmxmode=0666
# Add everything else in /proc/mounts into /etc/mtab, with
# special exceptions.
--- /etc/udev/rules.d/50-udev.rules.orig 2009-06-01 23:37:47.000000000 +0900
+++ /etc/udev/rules.d/50-udev.rules 2009-06-01 23:05:15.000000000 +0900
@@ -99,3 +99,5 @@
SUBSYSTEM=="aoe", NAME="etherd/%k"
KERNEL=="device-mapper", NAME="mapper/control"
+
+KERNEL=="ptmx", NAME="pts/ptmx"
つづきはまた後日。
1 件のコメント:
/lib/udev/devices/ の下にリンク作っておくこと。
# ls -l /lib/udev/devices/ptmx
lrwxrwxrwx 1 root root 13 2009-06-07 17:30 /lib/udev/devices/ptmx -> /dev/pts/ptmx
コメントを投稿