2 # the pccpuf kernel runs this file
7 mntgen -s slashn && chmod 666 /srv/slashn
9 # name translation, cs sets /dev/sysname
11 sysname=`{cat /dev/sysname}
14 NPROC = `{wc -l </dev/sysstat}
16 # site-specific startup
17 if(test -e /rc/bin/cpurc.local)
20 if (~ $#sysname 0 || ~ $sysname '') {
21 sysname = cirno # default
22 echo -n $sysname >/dev/sysname
24 prompt=($sysname^'# ' ' ')
26 # cpu-specific startup
27 if(test -e /cfg/$sysname/cpurc)
30 # start up internet if we don't already have an address
31 if(! grep u /net/ipselftab | grep -sv 127.0.0.1)
34 # if we're not a server, start a dns resolver
35 if(! test -e /srv/dns)
38 # If you are on an auth server, start these before listening:
40 auth/keyfs -wp -m /mnt/keys /adm/keys >/dev/null >[2=1]
41 auth/cron >>/sys/log/cron >[2=1] &
43 # also rename some files:
45 # if(! test -e /rc/bin/service.auth/tcp567){
46 # mv /rc/bin/service.auth/authsrv.il566 /rc/bin/service.auth/il566
47 # mv /rc/bin/service.auth/authsrv.tcp567 /rc/bin/service.auth/tcp567
48 # mv /rc/bin/service/il566 /rc/bin/service/_il566
49 # mv /rc/bin/service/tcp567 /rc/bin/service/_tcp567
52 # start listeners if it hasn't already been done (dicey check)
53 if(! netstat -n | grep -s 'tcp.*Listen.* (7|9|21|22|23|25|110|113|565|993|17007|17009|17010) .*')
55 # we don't use IL, maybe you do
56 if(! netstat -n | grep -v 17008 | grep -s il.*Listen)
59 if(! ps|grep -s timesync) {
60 aux/timesync -n pool.ntp.org
61 if (test -e '#r/rtc') @ {
62 sleep 10 # let timesync correct the time
63 awk '{print $1}' /dev/time >'#r/rtc' # fix hw clock
67 # cpu-specific late startup
68 if(test -e /cfg/$sysname/cpustart)
69 . /cfg/$sysname/cpustart
71 # mode of /proc/*/ctl is inherited across rfork, and sets modes on
72 # other /proc files, such as note, so let listen be killed.
73 dontkill '^(ipconfig|factotum|mntgen|venti|kfs|cwfs.*|cs|dns|reboot)$'
75 # echo `{date} $sysname >>/sys/log/boot