]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
fix lxc-console on centos / oracle unprivileged containers 456/head
authorStuart Cardall <developer@it-offshore.co.uk>
Mon, 2 Mar 2015 17:49:20 +0000 (17:49 +0000)
committerStuart Cardall <developer@it-offshore.co.uk>
Tue, 10 Mar 2015 10:55:42 +0000 (10:55 +0000)
Signed-off-by: Stuart Cardall <developer@it-offshore.co.uk>
templates/lxc-download.in

index 722f95f7d12353c15e8a8f51134dbf073365955c..e0a812f6b9dea0edba4efda3d7c726b4eb7dc9ec 100644 (file)
@@ -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