termrc 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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' '#S' '#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. }
  18. for (i in /sys/log/*) {
  19. if(~ $debug yes) echo bind $i
  20. bind /dev/null $i
  21. }
  22. if(~ $debug yes) echo bindlog done
  23. bind -a '#l' /net >/dev/null >[2=1]
  24. dossrv
  25. boota:
  26. boota: # again, just in case a timeout made the earlier one fail
  27. cp /n/a:/plan9.ini /tmp/plan9.orig
  28. # restore a partial install
  29. if(test -f /n/a:/9inst.cnf)
  30. cp /n/a:/9inst.cnf /tmp/vars
  31. # make vgadb easier to edit
  32. if(test -f /n/a:/vgadb)
  33. cp /n/a:/vgadb /lib/vgadb
  34. if(~ $mouseport ask){
  35. echo -n 'mouseport is (ps2, ps2intellimouse, 0, 1, 2)[ps2]: '
  36. mouseport=`{read}
  37. if(~ $#mouseport 0)
  38. mouseport=ps2
  39. }
  40. if(~ $vgasize ask){
  41. echo -n 'vgasize [640x480x8]: '
  42. vgasize=`{read}
  43. if(~ $#vgasize 0)
  44. vgasize=640x480x8
  45. }
  46. if(~ $monitor ask){
  47. echo -n 'monitor is [xga]: '
  48. monitor=`{read}
  49. if(~ $#monitor 0)
  50. monitor=xga
  51. }
  52. if(~ $#mouseport 1) {
  53. aux/mouse $mouseport
  54. if(~ $#vgasize 1 && ! ~ $vgasize '') {
  55. vgasize=`{echo $vgasize}
  56. aux/vga -vip $vgasize >/n/a:/vgainfo.txt
  57. sleep 2 # wait for floppy to finish
  58. aux/vga -l $vgasize
  59. echo -n 'hwaccel off' >'#v/vgactl' >[2]/dev/null
  60. echo -n 'hwblank off' >'#v/vgactl' >[2]/dev/null
  61. }
  62. }