#4538 [DEV] incorrect /etc/init/hvc0.conf on ubuntu 14.04.1-ppc64le kvm node after provisioning

This commit is contained in:
immarvin 2015-01-27 00:24:57 -08:00
parent e4486ca231
commit b877e034fb

View File

@ -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