NETem - Network Link Emulator for GNS3

serial.sh 840B

123456789101112131415161718192021
  1. # Add serial console support
  2. set -x
  3. # Boot configuration
  4. # Serial interface is secondary console, the vga console remains main console
  5. # To change that, exchange the two 'console=' boot parameter
  6. 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
  7. # /etc/inittab
  8. sudo sed -i -e '/tty6/ a ttyS0::respawn:/sbin/getty 38400 ttyS0 xterm' /etc/inittab
  9. # /etc/securetty
  10. sudo sed -i -e 's/^# *ttyS0/ttyS0/' /etc/securetty
  11. # reload inittab on startup
  12. 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
  13. # add modified files to backup list
  14. echo 'etc/inittab' >> /opt/.filetool.lst
  15. echo 'etc/securetty' >> /opt/.filetool.lst