2015-10-06 12:50:43 +00:00
|
|
|
# Add serial console support
|
|
|
|
|
|
|
|
set -x
|
|
|
|
|
|
|
|
# Boot configuration
|
|
|
|
# Serial interface is secondary console, the vga console remains main console
|
|
|
|
# To change that, exchange the two 'console=' boot parameter
|
2015-10-16 11:15:20 +00:00
|
|
|
sudo sed -i -e '1 i serial 0 38400' -e '/label .*core/,/append / s/\(append .*\)/\1 console=ttyS0,38400 console=tty0/' /mnt/sda1/boot/extlinux/extlinux.conf
|
2015-10-06 12:50:43 +00:00
|
|
|
|
|
|
|
# /etc/inittab
|
2015-10-07 07:33:56 +00:00
|
|
|
sudo sed -i -e '/tty6/ a ttyS0::respawn:/sbin/getty 38400 ttyS0 xterm' /etc/inittab
|
2015-10-06 12:50:43 +00:00
|
|
|
|
|
|
|
# /etc/securetty
|
|
|
|
sudo sed -i -e 's/^# *ttyS0/ttyS0/' /etc/securetty
|
|
|
|
|
2015-10-07 07:33:56 +00:00
|
|
|
# reload inittab on startup
|
|
|
|
sudo sed -i -e '/^\/opt\/bootlocal/ i' -e '/^\/opt\/bootlocal/ i # reload inittab' -e '/^\/opt\/bootlocal/ i kill -HUP 1' -e '/^\/opt\/bootlocal/ i' /opt/bootsync.sh
|
2015-10-06 12:50:43 +00:00
|
|
|
|
|
|
|
# add modified files to backup list
|
|
|
|
echo 'etc/inittab' >> /opt/.filetool.lst
|
|
|
|
echo 'etc/securetty' >> /opt/.filetool.lst
|