1
0

termrc 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. #!/bin/rc -x
  2. # replace FILESERVER with the name of your file server
  3. # here we start with kfs, your local disk file system
  4. fileserver=kfs
  5. # replace CPU with the name of your cpu server
  6. cpu=CPU
  7. # replace FACEDOM with the local domain to be used in the faces database
  8. facedom=FACEDOM
  9. TIMESYNCARGS=-rLa1000000
  10. NDBFILE=/lib/ndb/local
  11. if(test -e /rc/bin/termrc.local)
  12. . /rc/bin/termrc.local
  13. mntgen -s slashn && chmod 666 /srv/slashn
  14. # cs sets sysname
  15. ndb/cs -f $NDBFILE
  16. sysname=`{cat /dev/sysname}
  17. # start IP on the LAN. It's commented out to avoid a long timeout
  18. # on startup waiting for DHCP.
  19. #
  20. # If your system has DHCP
  21. #
  22. #if(! test -e /net/ipifc/0/ctl)
  23. # ip/ipconfig >/dev/null >[2=1]
  24. #
  25. # Otherwise use
  26. #
  27. #if(! test -e /net/ipifc/0/ctl)
  28. # ip/ipconfig -g your-gateway ether /net/ether0 your-ip-address your-subnet-mask >/dev/null >[2=1]
  29. if(test -e /net/ipifc/0/ctl)
  30. ndb/dns -rf $NDBFILE
  31. aux/timesync $TIMESYNCARGS
  32. switch($terminal){
  33. case carrera*
  34. bind -a '#t' /dev
  35. case *' ss'*
  36. /bin/bind -a '#w' /dev >/dev/null >[2=1]
  37. /bin/bind -a '#t' /dev >/dev/null >[2=1]
  38. case *' magnum'*
  39. /bin/bind -a '#m' /dev >/dev/null >[2=1]
  40. /bin/bind -a '#t' /dev >/dev/null >[2=1]
  41. aux/mouse -dC 0
  42. case *' indigo'*
  43. /bin/bind -a '#L' /dev >/dev/null >[2=1]
  44. /bin/bind -a '#w1' /dev >/dev/null >[2=1]
  45. /bin/bind -a '#t' /dev >/dev/null >[2=1]
  46. /bin/bind -a '#A' /dev >/dev/null >[2=1]
  47. case NCR* 'AT&TNSX'* generic* _MP_* 'alpha apc'*
  48. for(i in H w f t m v L S P U '$' Σ)
  49. /bin/bind -a '#'^$i /dev >/dev/null >[2=1]
  50. for(disk in /dev/sd??) {
  51. if(test -f $disk/data && test -f $disk/ctl)
  52. disk/fdisk -p $disk/data >$disk/ctl >[2]/dev/null
  53. for(part in $disk/plan9*)
  54. if(test -f $part)
  55. disk/prep -p $part >$disk/ctl >[2]/dev/null
  56. }
  57. if(! ~ `{cat /dev/user} none)
  58. aux/vmware
  59. if(~ $mouseport ask){
  60. echo -n 'mouseport is (ps2, ps2intellimouse, 0, 1, 2)[ps2]: '
  61. mouseport=`{read}
  62. if(~ $#mouseport 0)
  63. mouseport=ps2
  64. }
  65. if(~ $vgasize ask){
  66. echo -n 'vgasize [640x480x8]: '
  67. vgasize=`{read}
  68. if(~ $#vgasize 0)
  69. vgasize=640x480x8
  70. }
  71. if(~ $monitor ask){
  72. echo -n 'monitor is [xga]: '
  73. monitor=`{read}
  74. if(~ $#monitor 0)
  75. monitor=xga
  76. }
  77. if(test -f /dev/mousectl){
  78. switch($mouseport){
  79. case ps2 ps2intellimouse 0 1 2
  80. aux/mouse $mouseport
  81. # parse vgasize into fields
  82. vgasize=`{echo $vgasize}
  83. if(! ~ $"monitor '' && ! ~ `{cat /dev/user} none)
  84. aux/vga -l $vgasize
  85. if(~ $accupoint 1)
  86. pipefile -dr /bin/aux/accupoint /dev/mouse
  87. }
  88. }
  89. disk=''
  90. if(test -f /dev/sd*/swap)
  91. disk=`{ls /dev/sd*/swap >[2]/dev/null | sed 1q | sed 's!swap$!!'}
  92. if(! ~ $disk '') {
  93. swap $disk^swap >/dev/null >[2=1]
  94. dossrv
  95. c:
  96. }
  97. }