From 91bcb2dd78c6ab7ece70ed461c5cfc2e16b0560e Mon Sep 17 00:00:00 2001 From: Dwight Engen Date: Wed, 15 Jan 2014 12:21:52 -0500 Subject: [PATCH] oracle template: don't sed /etc/init/tty.conf on older releases MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Dwight Engen Acked-by: Stéphane Graber --- templates/lxc-oracle.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/lxc-oracle.in b/templates/lxc-oracle.in index ccc746a54..6df328de0 100644 --- a/templates/lxc-oracle.in +++ b/templates/lxc-oracle.in @@ -245,7 +245,9 @@ EOF echo "pts/0" >>$container_rootfs/etc/securetty # 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 sed -i 's|&& $1 !~ /^\\/dev\\/ram/|\&\& $2 !~ /^\\/dev\\/lxc/ \&\& $1 !~ /^\\/dev\\/ram/|' $container_rootfs/etc/init.d/halt -- 2.47.2