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