termrc 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. #!/bin/rc
  2. if(~ $#debug 1 && ~ $debug yes)
  3. flag x +
  4. if not
  5. debug=0
  6. if(~ $debug yes) echo env...
  7. sysname=gnot
  8. font=/lib/font/bit/lucidasans/typelatin1.7.font
  9. for (i in '#P' '#f' '#m' '#t' '#v') {
  10. if(~ $debug yes) echo bind $i
  11. bind -a $i /dev >/dev/null >[2=1]
  12. }
  13. if(~ $debug yes) echo binddev done
  14. for(disk in /dev/sd??) {
  15. if(test -f $disk/data && test -f $disk/ctl){
  16. disk/fdisk -p $disk/data >$disk/ctl >[2]/dev/null
  17. if(~ $#nosddma 0)
  18. echo dma on >$disk/ctl
  19. if(~ $#nosdrwm 0)
  20. echo rwm on >$disk/ctl
  21. }
  22. }
  23. for (i in /sys/log/*) {
  24. if(~ $debug yes) echo bind $i
  25. bind /dev/null $i
  26. }
  27. if(~ $debug yes) echo bindlog done
  28. bind -a '#l' /net >/dev/null >[2=1]
  29. dossrv
  30. boota:
  31. boota: # again, just in case a timeout made the earlier one fail
  32. cp /n/a:/plan9.ini /tmp/plan9.orig
  33. if(! ~ $cdboot yes){
  34. pci >/n/a:/pci.txt >[2]/dev/null
  35. cp /dev/kmesg /n/a:/boot.txt >[2]/dev/null
  36. }
  37. # restore a partial install
  38. if(test -f /n/a:/9inst.cnf)
  39. cp /n/a:/9inst.cnf /tmp/vars
  40. # make vgadb easier to edit
  41. if(test -f /n/a:/vgadb)
  42. cp /n/a:/vgadb /lib/vgadb
  43. aux/vmware
  44. if(~ $mouseport ask){
  45. echo -n 'mouseport is (ps2, ps2intellimouse, 0, 1, 2)[ps2]: '
  46. mouseport=`{read}
  47. if(~ $#mouseport 0)
  48. mouseport=ps2
  49. }
  50. if(~ $vgasize ask){
  51. echo -n 'vgasize [640x480x8]: '
  52. vgasize=`{read}
  53. if(~ $#vgasize 0)
  54. vgasize=640x480x8
  55. }
  56. if(~ $monitor ask){
  57. echo -n 'monitor is [xga]: '
  58. monitor=`{read}
  59. if(~ $#monitor 0)
  60. monitor=xga
  61. }
  62. if(~ $#mouseport 1) {
  63. aux/mouse $mouseport
  64. if(~ $#vgasize 1 && ! ~ $vgasize '') {
  65. vgasize=`{echo $vgasize}
  66. if(! ~ $cdboot yes)
  67. aux/vga -vip $vgasize >/n/a:/vgainfo.txt
  68. sleep 2 # wait for floppy to finish
  69. aux/vga -l $vgasize
  70. if(! ~ $#novgaaccel 0)
  71. echo -n 'hwaccel off' >'#v/vgactl' >[2]/dev/null
  72. if(! ~ $#novgablank 0)
  73. echo -n 'hwblank off' >'#v/vgactl' >[2]/dev/null
  74. }
  75. }
  76. # configure loopback device without touching /net/ndb
  77. {
  78. echo bind loopback /dev/null
  79. echo add 127.0.0.1 255.255.255.0
  80. } >/net/ipifc/clone