mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-15 08:05:20 +00:00
Merge pull request #456 from itoffshore/master
fix lxc-console on centos / oracle unprivileged containers
This commit is contained in:
commit
214b8bfce4
@ -575,6 +575,11 @@ for file in $TEMPLATE_FILES; do
|
|||||||
sed -i "s#LXC_HOOK_DIR#$LXC_HOOK_DIR#g" $file
|
sed -i "s#LXC_HOOK_DIR#$LXC_HOOK_DIR#g" $file
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# prevent mingetty from calling vhangup(2) since it fails with userns on Centos / Oracle
|
||||||
|
if [ -f ${LXC_ROOTFS}/etc/init/tty.conf ]; then
|
||||||
|
sed -i 's|mingetty|mingetty --nohangup|' ${LXC_ROOTFS}/etc/init/tty.conf
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -n "$LXC_MAPPED_UID" ] && [ "$LXC_MAPPED_UID" != "-1" ]; then
|
if [ -n "$LXC_MAPPED_UID" ] && [ "$LXC_MAPPED_UID" != "-1" ]; then
|
||||||
chown $LXC_MAPPED_UID $LXC_PATH/config $LXC_PATH/fstab >/dev/null 2>&1 || true
|
chown $LXC_MAPPED_UID $LXC_PATH/config $LXC_PATH/fstab >/dev/null 2>&1 || true
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user