Browse Source

Plan 9 from Bell Labs 2007-04-11

David du Colombier 17 years ago
parent
commit
e8036660e7
6 changed files with 51 additions and 10 deletions
  1. 3 1
      dist/replica/_plan9.db
  2. 3 3
      dist/replica/plan9.db
  3. 3 0
      dist/replica/plan9.log
  4. 1 0
      lib/namespace
  5. 39 5
      rc/bin/cpurc
  6. 2 1
      sys/games/lib/fortunes

+ 3 - 1
dist/replica/_plan9.db

@@ -5772,7 +5772,7 @@ sys/games - 20000000775 sys sys 1117225532 0
 sys/games/lib - 20000000775 sys sys 1165337608 0
 sys/games/lib/4scores - 10000000666 sys sys 1118680448 0
 sys/games/lib/5scores - 10000000666 sys sys 1118680453 0
-sys/games/lib/fortunes - 664 sys sys 1175084846 264123
+sys/games/lib/fortunes - 664 sys sys 1176226787 264469
 sys/games/lib/mahjongg - 20000000775 sys sys 1095792278 0
 sys/games/lib/mahjongg/backgrounds - 20000000775 sys sys 1095792293 0
 sys/games/lib/mahjongg/backgrounds/default.bit - 664 sys sys 1095792293 346803
@@ -15768,3 +15768,5 @@ usr/glenda/lib/profile - 664 glenda glenda 1105128663 890
 usr/glenda/readme.acme - 664 glenda glenda 1019860628 4753
 usr/glenda/readme.rio - 664 glenda glenda 1019860628 6370
 usr/glenda/tmp - 20000000775 glenda glenda 1018802620 0
+lib/namespace - 664 sys sys 1176262168 619
+rc/bin/cpurc - 775 sys sys 1176262038 2142

+ 3 - 3
dist/replica/plan9.db

@@ -5195,7 +5195,7 @@ lib/keyboard - 664 sys sys 1175869935 26173
 lib/mammals - 664 sys sys 944943772 27760
 lib/map - 20000000775 sys sys 1161442423 0
 lib/map/README - 664 sys sys 1161442423 105
-lib/namespace - 664 sys sys 1157899562 593
+lib/namespace - 664 sys sys 1176262168 619
 lib/namespace.ftp - 664 sys sys 1020313578 373
 lib/namespace.httpd - 664 sys sys 984695868 1209
 lib/ndb - 20000000775 sys sys 1065569740 0
@@ -5441,7 +5441,7 @@ rc/bin/b: - 775 sys sys 1015089510 204
 rc/bin/broke - 775 sys sys 1143389260 142
 rc/bin/bundle - 775 sys sys 945617206 173
 rc/bin/c: - 775 sys sys 1015089511 86
-rc/bin/cpurc - 775 sys sys 1123380857 1306
+rc/bin/cpurc - 775 sys sys 1176262038 2142
 rc/bin/delkey - 775 sys sys 1109429137 643
 rc/bin/dial - 20000000775 sys sys 1059180057 0
 rc/bin/diffy - 775 sys sys 1140694870 277
@@ -5772,7 +5772,7 @@ sys/games - 20000000775 sys sys 1117225532 0
 sys/games/lib - 20000000775 sys sys 1165337608 0
 sys/games/lib/4scores - 10000000666 sys sys 1118680448 0
 sys/games/lib/5scores - 10000000666 sys sys 1118680453 0
-sys/games/lib/fortunes - 664 sys sys 1175084846 264123
+sys/games/lib/fortunes - 664 sys sys 1176226787 264469
 sys/games/lib/mahjongg - 20000000775 sys sys 1095792278 0
 sys/games/lib/mahjongg/backgrounds - 20000000775 sys sys 1095792293 0
 sys/games/lib/mahjongg/backgrounds/default.bit - 664 sys sys 1095792293 346803

+ 3 - 0
dist/replica/plan9.log

@@ -48178,3 +48178,6 @@
 1175974205 2 c 386/bin/ndb/dnstcp - 775 sys sys 1175972561 260477
 1175974205 3 c 386/lib/libscribble.a - 664 sys sys 1175972562 107238
 1176152406 0 c rc/bin/diskparts - 775 sys sys 1176151301 559
+1176229806 0 c sys/games/lib/fortunes - 664 sys sys 1176226787 264469
+1176262206 0 c lib/namespace - 664 sys sys 1176262168 619
+1176262206 1 c rc/bin/cpurc - 775 sys sys 1176262038 2142

+ 1 - 0
lib/namespace

@@ -35,3 +35,4 @@ cd /usr/$user
 
 . /lib/namespace.local
 . /lib/namespace.$sysname
+. /cfg/$sysname/namespace

+ 39 - 5
rc/bin/cpurc

@@ -22,8 +22,23 @@ NPROC = `{wc -l </dev/sysstat}
 
 prompt=($sysname^'# ' '	')
 
-# pick a timeserver closer to you when you can or we'll get clogged
-aux/timesync plan9.bell-labs.com
+# site specific startup
+if(test -e /rc/bin/cpurc.local)
+	. /rc/bin/cpurc.local
+
+# cpu specific startup
+if(test -e /cfg/$sysname/cpurc)
+	. /cfg/$sysname/cpurc
+
+# if we're not a server, start a dns resolver
+if(! test -e /srv/dns)
+	ndb/dns -r
+
+# start up internet if we don't already have an address
+if(! grep u /net/ipselftab | grep -sv 127.0.0.1)
+	ip/ipconfig
+if(! grep -s 127.0.0.1 /net/ipselftab)
+	ip/ipconfig loopback /dev/null 127.1
 
 # uncomment the following for booting other systems
 #ip/dhcpd
@@ -43,6 +58,25 @@ aux/timesync plan9.bell-labs.com
 #	mv /rc/bin/service/tcp567 /rc/bin/service/_tcp567
 # }
 
-# services available to networks
-aux/listen -q -t /rc/bin/service.auth -d /rc/bin/service il
-aux/listen -q -t /rc/bin/service.auth -d /rc/bin/service tcp
+# 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
+#if(! netstat -n | grep -v 17008 | grep -s il.*Listen)
+#	aux/listen -q il
+
+if(! ps|grep -s timesync) {
+	# pick a timeserver closer to you when you can or we'll get clogged
+	aux/timesync plan9.bell-labs.com
+	if (test -e '#r/rtc') @ {
+		sleep 10			# let timesync correct the time
+		awk '{print $1}' /dev/time >'#r/rtc'	# fix hw clock
+	} &
+}
+
+# cpu specific startup
+#if(test -e /cfg/$sysname/cpustart)
+#	. /cfg/$sysname/cpustart
+
+#echo `{date} $sysname >>/sys/log/boot
+
+exit ''

+ 2 - 1
sys/games/lib/fortunes

@@ -4145,7 +4145,7 @@ Bitfield endianness not defined! Check your byteorder.h
 All I know about print is that you can do it too soon. - Ron Minnich
 acid: <stdin>:82: (error) 82: <eof> eating symbols
 1         2034   9/01 17:54 god@bell-labs.com            bye
-Girija pointed out a couple of bugs (I think of them as typos myself :-)   -Sape
+Girija pointed out a couple of bugs (I think of them as typos myself :-)   -sape
 Plan 9 makes BeOS look like a market leader.
 I'm doing it very slowly, so results will be as soon as possible...
 GTK+ is written in high quality object-orientated C.  - Programming with gtkmm
@@ -4174,3 +4174,4 @@ I love troff. It reminds me of runoff, which reminds me of my youth, when VMS wa
 General Internet error has occurred. - [OpenOffice.org 2.0]
 Remember to drink responsibly during this St. Patrick's Day season.
 File under POPULAR: Male Vocal - Syd Barrett LP sleeve
+N = C + {fb (cm) . fb (tc)} + fb (Ts) + fc . ta, where N=force in Newtons required to break the cooked bacon, fb=function of the bacon type, fc=function of the condiment/filling effect, Ts=serving temperature, tc=cooking time, ta=time or duration of application of condiment/filling, cm=cooking method, C=Newtons required to break uncooked bacon