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