git: 9front

Download patch

ref: 61ef36e5c06757f742fa0118c531099714c07d98
parent: 9dc39df20ecae73fce246218e6c9ecb8086f5d14
author: cinap_lenrek <cinap_lenrek@centraldogma>
date: Thu Jun 9 03:35:31 EDT 2011

add /net/ndb to default ndb database files, fix mistakes

--- a/.hgignore
+++ b/.hgignore
@@ -5,9 +5,8 @@
 ^sys/lib/python/.*\.(pyo|pyc|exe)$
 ^sys/log/
 ^sys/man/(searchindex|[1-8]/INDEX.*)$
-^(dev|fd|net|srv|env|root|boot|mnt|n|bin|tmp)/
+^(dev|fd|net|srv|env|root|boot|mnt|n|bin|usr|cfg|tmp)/
 ^(386|68000|68020|alpha|amd64|arm|power|power64|sparc|sparc64)/(bin|lib)/
 ^386/(9(pc|boot).*|pbs|mbr|init)
 ^acme/bin/(386|68000|68020|alpha|amd64|arm|power|power64|sparc|sparc64)/
 ^lib/audio/
-^usr/
--- a/cfg/cirno/cpurc
+++ /dev/null
@@ -1,10 +1,0 @@
-#!/bin/rc
-# the 9pccpuf kernel runs this file
-
-# example: adjust to fit your network
-#ip/ipconfig -g 192.168.0.1 ether /net/ether0 192.168.0.2 255.255.255.0
-#ndb/dns -rs
-#aux/timesync -Ln pool.ntp.org
-
-# outgoing mail will appear to originate from this domain
-#site=9front
--- a/cfg/cirno/cpustart
+++ /dev/null
@@ -1,17 +1,0 @@
-# the 9pccpuf kernel runs this file
-
-aux/listen -q -t /rc/bin/service.auth -d /rc/bin/service tcp
-
-@{
-	rfork n
-	if(~ $monitor vesa)
-		aux/realemu
-	aux/vga -l $vgasize
-}
-switch($mouseport){
-case ps2 ps2intellimouse 0 1 2
-	aux/mouse $mouseport
-	if(~ $accupoint 1)
-		pipefile -dr /bin/aux/accupoint /dev/mouse
-}
-exec rio
--- a/cfg/cirno/termrc
+++ /dev/null
@@ -1,10 +1,0 @@
-#!/bin/rc
-# the 9pcf kernerl runs this file
-
-# example: adjust to fit your network
-#ip/ipconfig -g 192.168.0.1 ether /net/ether0 192.168.0.2 255.255.255.0
-#ndb/dns -r
-#aux/timesync -Ln pool.ntp.org
-
-# outgoing mail will appear to originate from this domain
-#site=9front
--- a/lib/ndb/local
+++ b/lib/ndb/local
@@ -2,6 +2,7 @@
 #  files comprising the database, use as many as you like, see ndb(6)
 #
 database=
+	file=/net/ndb
 	file=/lib/ndb/local
 	file=/lib/ndb/common
 
--- a/rc/bin/cpurc
+++ b/rc/bin/cpurc
@@ -44,7 +44,7 @@
 
 if(! ps|grep -s timesync){
 	if(~ $#ntp 0)
-		eval `{ndb/ipquery sys $sysname ntp}
+		. <{ndb/ipquery sys $sysname ntp | sed 's, +,\n,g'}
 	if(~ $#ntp 0)
 		ntp=pool.ntp.org
 	aux/timesync -n $ntp
@@ -52,7 +52,7 @@
 }
 
 if(~ $#auth 0)
-	eval `{ndb/ipquery sys $sysname auth}
+	. <{ndb/ipquery sys $sysname auth | sed 's, +,\n,g'}
 switch($auth){
 case `{	echo $sysname; ndb/query sys $sysname dom
 	for(i in `{awk '/u\ *$/{print $1}' /net/ipselftab}){
@@ -66,12 +66,9 @@
 	aux/listen -q -d /rc/bin/service tcp
 }
 
-# cpu-specific late startup
-if(test -e /cfg/$sysname/cpustart)
-	. /cfg/$sysname/cpustart
+if(test -f /dev/apm)
+	aux/apm
 
 # mode of /proc/*/ctl is inherited across rfork, and sets modes on
 # other /proc files, such as note, so let listen be killed.
 dontkill '^(ipconfig|factotum|mntgen|venti|kfs|cwfs.*|cs|dns|reboot)$'
-
-exit ''
--- a/rc/bin/termrc
+++ b/rc/bin/termrc
@@ -41,7 +41,7 @@
 	ether=`{ndb/query sys $sysname ether}
 	if(~ $#ether 1){
 		# try /lib/ndb first, then do dhcp
-		ip/ipconfig -N || ip/ipconfig
+		ip/ipconfig -N >[2]/dev/null || ip/ipconfig
 	}
 	rm -f /env/ether
 }
--- a/sys/lib/rootstub
+++ b/sys/lib/rootstub
@@ -102,6 +102,7 @@
 mkdir -p arm/bin/usb
 mkdir -p arm/bin/venti
 mkdir -p arm/lib/ape
+mkdir -p cfg
 mkdir -p cron
 mkdir -p dist/plan9front
 mkdir -p fd
--