/[sysadmin-cookbook]/recepies/amt/serial-console.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /recepies/amt/serial-console.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 76 - (hide annotations)
Sun May 17 11:50:30 2009 UTC (14 years, 10 months ago) by dpavlin
File MIME type: application/x-sh
File size: 479 byte(s)
add console option to kernel
1 dpavlin 75 #!/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
13 dpavlin 76
14     grub=/boot/grub/menu.lst
15    
16     if ! grep '^# kopt=' $grub | grep console= ; then
17     cat $grub | sed "s/^\(# kopt=.*\)$/\1 console=$ttyS,115200/" > $grub.serial
18     diff -urw $grub $grub.serial
19     fi

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26