From b877e034fbdeb64767f23a85b20923dc6f8882e1 Mon Sep 17 00:00:00 2001 From: immarvin Date: Tue, 27 Jan 2015 00:24:57 -0800 Subject: [PATCH] #4538 [DEV] incorrect /etc/init/hvc0.conf on ubuntu 14.04.1-ppc64le kvm node after provisioning --- .../share/xcat/install/scripts/post.ubuntu | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/xCAT-server/share/xcat/install/scripts/post.ubuntu b/xCAT-server/share/xcat/install/scripts/post.ubuntu index 2f1c16076..d8f948fe7 100755 --- a/xCAT-server/share/xcat/install/scripts/post.ubuntu +++ b/xCAT-server/share/xcat/install/scripts/post.ubuntu @@ -206,20 +206,27 @@ if echo "$ARCH" | grep -i 'ppc64'; then update-grub cat >/etc/init/$CONSOLE\.conf << 'EOF' -start on stopped rc RUNLEVEL=[2345] and (not-container or container container CONTAINER=lxc or container CONTAINER=lxc-libvirt) +start on stopped rc RUNLEVEL=[2345] and ( + not-container or + container CONTAINER=lxc or + container CONTAINER=lxc-libvirt) + stop on runlevel [!2345] respawn +#exec /sbin/getty -L 115200 hvc0 vt102 script for i in `cat /proc/cmdline`; do KEY=`echo $i|cut -d= -f 1` if [ "$KEY" == "console" -a "$i" != "console=tty0" ]; then - VALUE=`echo $i | cut -d= -f 2` - COTTY=`echo $VALUE|cut -d, -f 1` - COSPEED=`echo $VALUE|cut -d, -f 2|cut -dn -f 1` - exec /sbin/getty -L $COSPEED $COTTY vt102 + VALUE=`echo $i | awk -F= '{print $2}'` + COTTY=`echo $VALUE|awk -F, '{print $1}'` + COSPEED=`echo $VALUE|awk -F, '{print $2}'|awk -Fn '{print $1}'` + break fi done + + exec /sbin/getty -L $COSPEED $COTTY vt102 end script EOF fi