2
0
mirror of git://github.com/lxc/lxc synced 2025-08-31 23:15:03 +00:00

oracle template: don't sed /etc/init/tty.conf on older releases

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
Dwight Engen
2014-01-15 12:21:52 -05:00
committed by Stéphane Graber
parent 9e69977fa6
commit 91bcb2dd78

View File

@@ -245,7 +245,9 @@ EOF
echo "pts/0" >>$container_rootfs/etc/securetty echo "pts/0" >>$container_rootfs/etc/securetty
# prevent mingetty from calling vhangup(2) since it fails with userns # prevent mingetty from calling vhangup(2) since it fails with userns
sed -i 's|mingetty|mingetty --nohangup|' $container_rootfs/etc/init/tty.conf if [ -f $container_rootfs/etc/init/tty.conf ]; then
sed -i 's|mingetty|mingetty --nohangup|' $container_rootfs/etc/init/tty.conf
fi
# dont try to unmount /dev/lxc devices # dont try to unmount /dev/lxc devices
sed -i 's|&& $1 !~ /^\\/dev\\/ram/|\&\& $2 !~ /^\\/dev\\/lxc/ \&\& $1 !~ /^\\/dev\\/ram/|' $container_rootfs/etc/init.d/halt sed -i 's|&& $1 !~ /^\\/dev\\/ram/|\&\& $2 !~ /^\\/dev\\/lxc/ \&\& $1 !~ /^\\/dev\\/ram/|' $container_rootfs/etc/init.d/halt