cat - > etc/init/ttyS0.conf <<EOF
# ttyS0 - getty
#
# This service maintains a getty on ttyS0 from the point the system is
# started until it is shut down again.
start on stopped rc or RUNLEVEL=[12345]
stop on runlevel [!12345]
respawn
exec /sbin/getty --autologin root -L 115200 ttyS0 vt102
EOF

cat - > etc/event.d/ttyS0 <<EOF
# ttyS0 - getty
#
# This service maintains a getty on ttyS0 from the point the system is
# started until it is shut down again.