cpurc 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. #!/bin/rc
  2. boottime=`{date}
  3. boottime=$"boottime
  4. site=plan9
  5. fileserver=emelie
  6. facedom=astro
  7. bind -a '#f' /dev
  8. bind -a '#t' /dev
  9. bind -a '#S' /dev
  10. bind -a '#m' /dev
  11. echo 'dma on' > /dev/sdC0/ctl
  12. swap /dev/sdC0/swap
  13. # start internal network
  14. if(test -e /net/ipifc/clone){
  15. ip/ipconfig -g 135.104.9.1 ether /net/ether0 135.104.9.11 255.255.255.0
  16. ip/ipconfig ether /net/ether0 add 135.104.9.114 255.255.255.0
  17. }
  18. # cs sets /dev/sysname
  19. sysname=boundary
  20. ndb/cs
  21. sysname=`{cat /dev/sysname}
  22. switch($sysname){
  23. case achille lookout boundary
  24. ndb/dns -s
  25. case *
  26. ndb/dns -r
  27. }
  28. # parallelism for mk
  29. NPROC=2
  30. prompt=($sysname^'# ' ' ')
  31. # auth server
  32. # auth/keyfs -wp -m/mnt/keys /adm/keys # > /dev/null >[2=1]
  33. # auth/keyfs -wn -m/mnt/netkeys /adm/netkeys # > /dev/null >[2=1]
  34. # internal network services
  35. chmod 600 /srv/kfs.cmd
  36. aux/listen -q -t /bin/service.auth -d /bin/service il
  37. aux/listen -q -t /bin/service.auth -d /bin/service tcp
  38. # ip/dhcpd
  39. # ip/tftpd
  40. # start external network
  41. ip/ipconfig -x /net.alt -g 204.178.31.1 ether /net.alt/ether1 204.178.31.4 255.255.255.0
  42. # external network services
  43. ndb/cs -x /net.alt -f /lib/ndb/external
  44. ndb/dns -sx /net.alt -f /lib/ndb/external
  45. #aux/listen -d /rc/bin/service.alt -t /rc/bin/service.alt.auth /net.alt/tcp
  46. #aux/listen -d /rc/bin/service.alt /net.alt/il
  47. # don't allow anyone to start an external vnc server
  48. ip/hogports /net.alt/tcp!*!5900-5950
  49. # what time is it?
  50. aux/timesync -s /net -nl -s /net.alt -d /sys/log/timesync.d oncore
  51. # serial line services
  52. aux/consolefs
  53. {
  54. # give consolefs time to start up
  55. # then log some of the more important consoles
  56. sleep 5
  57. mk -f /sys/log/mkfile startclog
  58. } &
  59. # make sure cron is alive
  60. # {
  61. # while(test true){
  62. # switch(`{ps|grep cron}){
  63. # case *cron
  64. # ;
  65. # case *
  66. # rm -fr /srv/$fileserver
  67. # srv $fileserver && mount -c /srv/$fileserver /n/$fileserver &&
  68. # {
  69. # bind -c /n/$fileserver/cron /cron
  70. # auth/cron >> /sys/log/cron >[2=1] &
  71. # }
  72. # }
  73. # sleep 300
  74. # }
  75. # } &
  76. if(test -f /dev/mousectl){
  77. switch($mouseport){
  78. case ps2 0 1 2
  79. if(aux/mouse $mouseport && ! ~ $monitor ''){
  80. echo accelerated > /dev/mousectl
  81. echo 'res 3' > /dev/mousectl
  82. aux/vga -l $vgasize
  83. echo -n ctlpoff > /dev/consctl
  84. font=/lib/font/bit/pelm/euro.9.font
  85. #rio -s
  86. }
  87. }
  88. }