mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-17 01:45:09 +00:00
ubuntu: Various fixes
- Drop disabled entries from allowed devices list - Improve generated config layout a bit - Drop redundant uname call - Re-generate the SSH host keys on container creation Signed-off-by: Stéphane Graber <stgraber@ubuntu.com> Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
parent
ed4616b1cf
commit
a2abaa9ec6
@ -70,8 +70,6 @@ lxc.cgroup.devices.allow = c 1:5 rwm
|
|||||||
# consoles
|
# consoles
|
||||||
lxc.cgroup.devices.allow = c 5:1 rwm
|
lxc.cgroup.devices.allow = c 5:1 rwm
|
||||||
lxc.cgroup.devices.allow = c 5:0 rwm
|
lxc.cgroup.devices.allow = c 5:0 rwm
|
||||||
#lxc.cgroup.devices.allow = c 4:0 rwm
|
|
||||||
#lxc.cgroup.devices.allow = c 4:1 rwm
|
|
||||||
# /dev/{,u}random
|
# /dev/{,u}random
|
||||||
lxc.cgroup.devices.allow = c 1:9 rwm
|
lxc.cgroup.devices.allow = c 1:9 rwm
|
||||||
lxc.cgroup.devices.allow = c 1:8 rwm
|
lxc.cgroup.devices.allow = c 1:8 rwm
|
||||||
@ -148,8 +146,6 @@ if [ -f /etc/lsb-release ]; then
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
arch=$(uname -m)
|
|
||||||
|
|
||||||
# Code taken from debootstrap
|
# Code taken from debootstrap
|
||||||
if [ -x /usr/bin/dpkg ] && /usr/bin/dpkg --print-architecture >/dev/null 2>&1; then
|
if [ -x /usr/bin/dpkg ] && /usr/bin/dpkg --print-architecture >/dev/null 2>&1; then
|
||||||
arch=`/usr/bin/dpkg --print-architecture`
|
arch=`/usr/bin/dpkg --print-architecture`
|
||||||
|
@ -91,6 +91,14 @@ EOF
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# generate new SSH keys
|
||||||
|
if [ -x $rootfs@LOCALSTATEDIR@/lib/dpkg/info/openssh-server.postinst ]; then
|
||||||
|
rm -f $rootfs/etc/ssh/ssh_host_*key*
|
||||||
|
mv $rootfs/etc/init/ssh.conf $rootfs/etc/init/ssh.conf.disabled
|
||||||
|
chroot $rootfs @LOCALSTATEDIR@/lib/dpkg/info/openssh-server.postinst configure
|
||||||
|
mv $rootfs/etc/init/ssh.conf.disabled $rootfs/etc/init/ssh.conf
|
||||||
|
fi
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -350,8 +358,6 @@ lxc.cgroup.devices.allow = c 1:5 rwm
|
|||||||
# consoles
|
# consoles
|
||||||
lxc.cgroup.devices.allow = c 5:1 rwm
|
lxc.cgroup.devices.allow = c 5:1 rwm
|
||||||
lxc.cgroup.devices.allow = c 5:0 rwm
|
lxc.cgroup.devices.allow = c 5:0 rwm
|
||||||
#lxc.cgroup.devices.allow = c 4:0 rwm
|
|
||||||
#lxc.cgroup.devices.allow = c 4:1 rwm
|
|
||||||
# /dev/{,u}random
|
# /dev/{,u}random
|
||||||
lxc.cgroup.devices.allow = c 1:9 rwm
|
lxc.cgroup.devices.allow = c 1:9 rwm
|
||||||
lxc.cgroup.devices.allow = c 1:8 rwm
|
lxc.cgroup.devices.allow = c 1:8 rwm
|
||||||
@ -605,7 +611,6 @@ if [ -f /etc/lsb-release ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
bindhome=
|
bindhome=
|
||||||
arch=$(uname -m)
|
|
||||||
|
|
||||||
# Code taken from debootstrap
|
# Code taken from debootstrap
|
||||||
if [ -x /usr/bin/dpkg ] && /usr/bin/dpkg --print-architecture >/dev/null 2>&1; then
|
if [ -x /usr/bin/dpkg ] && /usr/bin/dpkg --print-architecture >/dev/null 2>&1; then
|
||||||
|
Loading…
Reference in New Issue
Block a user