]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
oracle template: don't sed /etc/init/tty.conf on older releases
authorDwight Engen <dwight.engen@oracle.com>
Wed, 15 Jan 2014 17:21:52 +0000 (12:21 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 15 Jan 2014 17:29:19 +0000 (12:29 -0500)
Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
templates/lxc-oracle.in

index ccc746a543d2bc355f8a544b77da50537a5d43ba..6df328de0e867b2433eadf20f68ae0295bd0ef08 100644 (file)
@@ -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