From: Stuart Cardall Date: Mon, 2 Mar 2015 17:49:20 +0000 (+0000) Subject: fix lxc-console on centos / oracle unprivileged containers X-Git-Tag: lxc-2.0.0.beta1~350^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e53ca56a40d114bc672bb0edb99535d6ba2d763;p=thirdparty%2Flxc.git fix lxc-console on centos / oracle unprivileged containers Signed-off-by: Stuart Cardall --- diff --git a/templates/lxc-download.in b/templates/lxc-download.in index 722f95f7d..e0a812f6b 100644 --- a/templates/lxc-download.in +++ b/templates/lxc-download.in @@ -575,6 +575,11 @@ for file in $TEMPLATE_FILES; do sed -i "s#LXC_HOOK_DIR#$LXC_HOOK_DIR#g" $file 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 chown $LXC_MAPPED_UID $LXC_PATH/config $LXC_PATH/fstab >/dev/null 2>&1 || true fi