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