shithub: riscv

Download patch

ref: 4a98f5c1d17b71e1e61982b933135b86e9e3d961
parent: 78828434f7d21d90ed83fa35f15f8a8efb92ee7b
author: cinap_lenrek <cinap_lenrek@centraldogma>
date: Sun Jun 5 21:31:58 EDT 2011

merge (term cpu)^rc.local with (term cpu)^rc, mount /srv/cons in (term cpu)^rc instead of /lib/namespace as we dont want to have it in every namespace (cpu session).

--- a/lib/namespace
+++ b/lib/namespace
@@ -11,9 +11,6 @@
 bind -c #s /srv
 bind -a #¤ /dev
 
-# userspace devices
-mount -qb /srv/cons /dev
-
 # mount points
 mount -a /srv/slashn /n
 
--- a/rc/bin/cpurc
+++ b/rc/bin/cpurc
@@ -3,6 +3,12 @@
 
 date > /env/boottime
 
+for(i in m i P S t u '$')
+	bind -a '#'^$i /dev >/dev/null >[2=1]
+
+mount -qb /srv/cons /dev
+mount -qa /srv/usb /dev
+
 # mount points
 mntgen -s slashn && chmod 666 /srv/slashn
 
@@ -13,10 +19,6 @@
 # parallelism for mk
 NPROC = `{wc -l </dev/sysstat}
 
-# site-specific startup
-if(test -e /rc/bin/cpurc.local)
-	. /rc/bin/cpurc.local
-
 if (~ $#sysname 0 || ~ $sysname '') {
 	sysname = cirno			# default
 	echo -n $sysname >/dev/sysname
@@ -49,12 +51,8 @@
 #	mv /rc/bin/service/tcp567 /rc/bin/service/_tcp567
 # }
 
-# start listeners if it hasn't already been done (dicey check)
-if(! netstat -n | grep -s 'tcp.*Listen.* (7|9|21|22|23|25|110|113|565|993|17007|17009|17010) .*')
-	aux/listen -q tcp
-# we don't use IL, maybe you do
-if(! netstat -n | grep -v 17008 | grep -s il.*Listen)
-	aux/listen -q il
+# start listeners
+aux/listen -q -t /rc/bin/service.auth -d /rc/bin/service tcp
 
 if(! ps|grep -s timesync) {
 	aux/timesync -n pool.ntp.org
--- a/rc/bin/cpurc.local
+++ /dev/null
@@ -1,16 +1,0 @@
-#!/bin/rc
-# the 9pccpuf kernel runs this file
-
-# used only by upas, as default return domain appended to all unqualified
-# return addresses, even local ones
-site=EXAMPLE
-# replace FILESERVER with the name of your file server
-# here we start with cwfs, your local disk file system
-fileserver=cwfs
-# replace FACEDOM with the local domain to be used in the faces database
-facedom=FACEDOM
-
-for(i in m i P S t u '$')
-	bind -a '#'^$i /dev >/dev/null >[2=1]
-
-mount -qa /srv/usb /dev
--- a/rc/bin/termrc
+++ b/rc/bin/termrc
@@ -1,7 +1,6 @@
 #!/bin/rc
 # terminal startup
 TIMESYNCARGS=(-rLa1000000)
-NDBFILE=/lib/ndb/local
 
 mntgen -s slashn && chmod 666 /srv/slashn
 
@@ -10,6 +9,7 @@
 	bind -a '#'^$i /dev >/dev/null >[2=1]
 rm -f /env/i
 
+mount -qb /srv/cons /dev
 mount -qa /srv/usb /dev
 
 # set up any partitions
@@ -21,19 +21,16 @@
 	swap $disk(1) >/dev/null >[2=1]
 rm -f /env/disk
 
-# we do this before we have a name.  we may need to do network
-# setup so that we can get a name.
-if(test -e /rc/bin/termrc.local)
-	. /rc/bin/termrc.local
-
-# cs sets sysname (termrc.local may already have started it so check)
-if(! test -e /srv/cs && ! test -e /net/cs)
-	ndb/cs -f $NDBFILE
+# cs sets sysname
+ndb/cs
 sysname=`{cat /dev/sysname}
 if(~ $#sysname 0 || ~ $sysname ''){
 	sysname=cirno			# default
 	echo -n $sysname >/dev/sysname
 }
+
+# parallelism for mk
+NPROC = `{wc -l </dev/sysstat}
 
 # machine specific startup (e.g., for devices not probed)
 if(test -e /cfg/$sysname/termrc)
--- a/rc/bin/termrc.local
+++ /dev/null
@@ -1,13 +1,0 @@
-#!/bin/rc
-# the 9pcf kernel runs this file
-
-# used only by upas, as default return domain appended to all unqualified
-# return addresses, even local ones
-site=plan9
-# replace FILESERVER with the name of your file server
-# here we start with kfs, your local disk file system
-fileserver=kfs
-# replace FACEDOM with the local domain to be used in the faces database
-facedom=FACEDOM
-# replace CPU with the name of your cpu server
-cpu=CPU