Commit 8df26800 by KATOH Yasufumi Committed by Stéphane Graber

plamo: Change how to create objects under /dev in the container

lxc-plamo stop: * creating objects under /dev when creating the container * removing /dev population process from original rc script now populate /dev at container boot time, and allow to enable lxc.autodev=1 Signed-off-by: 's avatarKATOH Yasufumi <karma@jazz.email.ne.jp> Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent 397a1b4b
# This derives from the global common config # This derives from the global common config
lxc.include = @LXCTEMPLATECONFIG@/common.conf lxc.include = @LXCTEMPLATECONFIG@/common.conf
# Default mount
lxc.mount.entry = none dev/shm tmpfs nosuid,nodev,noexec,mode=1777 0 0
# Doesn't support consoles in /dev/lxc/ # Doesn't support consoles in /dev/lxc/
lxc.devttydir = lxc.devttydir =
# /dev/* is created manually by template
lxc.autodev = 0
# Extra cgroup device access # Extra cgroup device access
## rtc ## rtc
lxc.cgroup.devices.allow = c 254:0 rm lxc.cgroup.devices.allow = c 254:0 rm
......
...@@ -147,23 +147,6 @@ install_plamo() { ...@@ -147,23 +147,6 @@ install_plamo() {
} }
configure_plamo() { configure_plamo() {
# create /dev
chmod 666 $rootfs/dev/null
mknod -m 666 $rootfs/dev/zero c 1 5
chmod 666 $rootfs/dev/random
mknod -m 666 $rootfs/dev/urandom c 1 9
mkdir -m 755 $rootfs/dev/pts
mkdir -m 755 $rootfs/dev/shm
chmod 666 $rootfs/dev/tty
chmod 600 $rootfs/dev/console
mknod -m 666 $rootfs/dev/tty0 c 4 0
mknod -m 666 $rootfs/dev/tty1 c 4 1
mknod -m 666 $rootfs/dev/tty2 c 4 2
mknod -m 666 $rootfs/dev/tty3 c 4 3
mknod -m 666 $rootfs/dev/tty4 c 4 4
mknod -m 666 $rootfs/dev/full c 1 7
mknod -m 600 $rootfs/dev/initctl p
mknod -m 666 $rootfs/dev/ptmx c 5 2
# suppress log level output for udev # suppress log level output for udev
sed -i 's/="err"/=0/' $rootfs/etc/udev/udev.conf sed -i 's/="err"/=0/' $rootfs/etc/udev/udev.conf
# /etc/fstab # /etc/fstab
...@@ -207,10 +190,9 @@ configure_plamo() { ...@@ -207,10 +190,9 @@ configure_plamo() {
echo "Setting root password to 'root'..." echo "Setting root password to 'root'..."
echo "root:root" | chroot $rootfs chpasswd echo "root:root" | chroot $rootfs chpasswd
echo "Please change root password!" echo "Please change root password!"
# /etc/rc.d/rc.S
ed - $rootfs/etc/rc.d/rc.S <<- "EOF" ed - $rootfs/etc/rc.d/rc.S <<- "EOF"
/^mount -w -n -t proc/;/^# ln -s \/bin\/true/-1d /^mount -w -n -t proc/;/^mkdir \/dev\/shm/-1d
/^mknod \/dev\/unikey/;/^# Clean \/etc\/mtab/-2d /^mknod \/dev\/null/;/^# Clean \/etc\/mtab/-2d
/^# copy the rules/;/^# Set the hostname/-1d /^# copy the rules/;/^# Set the hostname/-1d
/^# Check the integrity/;/^# Clean up temporary/-1d /^# Check the integrity/;/^# Clean up temporary/-1d
w w
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment