[lxc-devel] [PATCH 2/3] oracle template: don't sed /etc/init/tty.conf on older releases
Dwight Engen
dwight.engen at oracle.com
Wed Jan 15 17:21:52 UTC 2014
Signed-off-by: Dwight Engen <dwight.engen at oracle.com>
---
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 ccc746a..6df328d 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
--
1.8.3.1
More information about the lxc-devel
mailing list