add serial console as described in amt-howto
[sysadmin-cookbook] / recepies / amt / serial-console.sh
1 #!/bin/sh -x
2
3 # add AMT serial console to inittab
4
5 ttyS=`dmesg | grep ttyS | grep 0xe | sed 's/^.*\(ttyS[0-9]\).*$/\1/'`
6
7 if ! grep ttyS1 /etc/inittab | grep -v ^# ; then
8         echo "Am:2345:respawn:/sbin/getty $ttyS 115200 vt100-nav" >> /etc/inittab
9         init q
10 fi
11
12 ps ax | grep $ttyS | grep -v grep