termrc 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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. diskparts
  51. if(! ~ `{cat /dev/user} none)
  52. aux/vmware
  53. if(~ $mouseport ask){
  54. echo -n 'mouseport is (ps2, ps2intellimouse, 0, 1, 2)[ps2]: '
  55. mouseport=`{read}
  56. if(~ $#mouseport 0)
  57. mouseport=ps2
  58. }
  59. if(~ $vgasize ask){
  60. echo -n 'vgasize [640x480x8]: '
  61. vgasize=`{read}
  62. if(~ $#vgasize 0)
  63. vgasize=640x480x8
  64. }
  65. if(~ $monitor ask){
  66. echo -n 'monitor is [xga]: '
  67. monitor=`{read}
  68. if(~ $#monitor 0)
  69. monitor=xga
  70. }
  71. if(test -f /dev/mousectl){
  72. switch($mouseport){
  73. case ps2 ps2intellimouse 0 1 2
  74. aux/mouse $mouseport
  75. # parse vgasize into fields
  76. vgasize=`{echo $vgasize}
  77. if(! ~ $"monitor '' && ! ~ `{cat /dev/user} none)
  78. aux/vga -l $vgasize
  79. if(~ $accupoint 1)
  80. pipefile -dr /bin/aux/accupoint /dev/mouse
  81. }
  82. }
  83. # start up local swapping, mount dos fat fs
  84. disk=`{ls /dev/sd*/swap >[2]/dev/null}
  85. if (! ~ $#disk 0) {
  86. swap $disk(1) >/dev/null >[2=1]
  87. dossrv
  88. c:
  89. }
  90. rm /env/disk
  91. }