Browse Source

Plan 9 from Bell Labs 2007-09-16

David du Colombier 16 years ago
parent
commit
ad39232b16
4 changed files with 26 additions and 25 deletions
  1. 1 1
      dist/replica/_plan9.db
  2. 23 23
      dist/replica/network
  3. 1 1
      dist/replica/plan9.db
  4. 1 0
      dist/replica/plan9.log

+ 1 - 1
dist/replica/_plan9.db

@@ -891,7 +891,7 @@ dist - 20000000775 sys sys 1127243723 0
 dist/replica - 20000000775 sys sys 1166743907 0
 dist/replica - 20000000775 sys sys 1166743907 0
 dist/replica/cd - 664 sys sys 1149084099 922
 dist/replica/cd - 664 sys sys 1149084099 922
 dist/replica/kfs - 664 sys sys 1019527929 237
 dist/replica/kfs - 664 sys sys 1019527929 237
-dist/replica/network - 775 sys sys 1189810597 1038
+dist/replica/network - 775 sys sys 1189903604 1075
 dist/replica/plan9.proto - 664 sys sys 1178910941 2871
 dist/replica/plan9.proto - 664 sys sys 1178910941 2871
 env - 20000000775 sys sys 1104813586 0
 env - 20000000775 sys sys 1104813586 0
 fd - 20000000775 sys sys 1020896384 0
 fd - 20000000775 sys sys 1020896384 0

+ 23 - 23
dist/replica/network

@@ -10,33 +10,33 @@ fn servermount {
 }
 }
 fn serverupdate { status='' }
 fn serverupdate { status='' }
 
 
-if (! test -e /srv/boot && ! test -e /srv/kfs) {
-	echo 'error: neither /srv/boot nor /srv/kfs present; make sure you are running on the file server'
-	exit '/srv/boot or /srv/kfs not present'
-}
-
-if (test -e /srv/fscons) {
-	if (! test -w /srv/fscons) {
-		echo 'error: no write access to /srv/fscons, make sure you are the host owner'
-		echo 'mounting /srv/boot on /n/boot'
+fn clientmount {
+	unmount /n/boot >[2]/dev/null
+	if(test -e /srv/fscons){
+		if(! test -e /srv/replica){
+			echo 'srv -AWP replica' >>/srv/fscons >[2]/dev/null ||
+				echo 'warning: could not write to /srv/fscons' >[1=2]
+		}
+		if(! mount -c /srv/replica /n/boot)
+			echo 'warning: cannot mount /srv/replica' >[1=2]
+		status=''
+	}
+	if not if(test -e /srv/kfs){
+		mount -c /srv/kfs /n/boot
+		status=''
+	}
+	if(! test -d /n/boot/dist/replica){
+		echo 'warning: could not mount /srv/replica or /srv/kfs; using /srv/boot' >[1=2]
 		mount -c /srv/boot /n/boot
 		mount -c /srv/boot /n/boot
 	}
 	}
-
-	fn clientmount {
-		if (test -w /srv/fscons)
-			echo 'srv -AWP replica' >>/srv/fscons
-		if (test -e /srv/replica)
-			mount -c /srv/replica /n/boot
+	if(! test -d /n/boot/dist/replica){
+		echo 'could not mount client root' >[1=2]
+		exit 'no /dist/replica'
 	}
 	}
-	c=/n/boot/dist/replica
-	clientroot=/n/boot
-}
-if not {
-	fn clientmount { 9fs kfs }
-	c=/n/kfs/dist/replica
-	clientroot=/n/kfs
+	status=''
 }
 }
-
+c=/n/boot/dist/replica
+clientroot=/n/boot
 clientdb=$c/client/plan9.db
 clientdb=$c/client/plan9.db
 clientexclude=(dist/replica/client)
 clientexclude=(dist/replica/client)
 clientlog=$c/client/plan9.log
 clientlog=$c/client/plan9.log

+ 1 - 1
dist/replica/plan9.db

@@ -891,7 +891,7 @@ dist - 20000000775 sys sys 1127243723 0
 dist/replica - 20000000775 sys sys 1166743907 0
 dist/replica - 20000000775 sys sys 1166743907 0
 dist/replica/cd - 664 sys sys 1149084099 922
 dist/replica/cd - 664 sys sys 1149084099 922
 dist/replica/kfs - 664 sys sys 1019527929 237
 dist/replica/kfs - 664 sys sys 1019527929 237
-dist/replica/network - 775 sys sys 1189810597 1038
+dist/replica/network - 775 sys sys 1189903604 1075
 dist/replica/plan9.proto - 664 sys sys 1178910941 2871
 dist/replica/plan9.proto - 664 sys sys 1178910941 2871
 env - 20000000775 sys sys 1104813586 0
 env - 20000000775 sys sys 1104813586 0
 fd - 20000000775 sys sys 1020896384 0
 fd - 20000000775 sys sys 1020896384 0

+ 1 - 0
dist/replica/plan9.log

@@ -52776,3 +52776,4 @@
 1189738804 1 c sys/src/cmd/venti/srv/fixarenas.c - 664 sys sys 1189738460 40533
 1189738804 1 c sys/src/cmd/venti/srv/fixarenas.c - 664 sys sys 1189738460 40533
 1189738804 2 c sys/src/cmd/venti/srv/icachewrite.c - 664 sys sys 1189738523 7785
 1189738804 2 c sys/src/cmd/venti/srv/icachewrite.c - 664 sys sys 1189738523 7785
 1189810805 0 c dist/replica/network - 775 sys sys 1189810597 1038
 1189810805 0 c dist/replica/network - 775 sys sys 1189810597 1038
+1189904404 0 c dist/replica/network - 775 sys sys 1189903604 1075