Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#!/bin/rc
2
 
3
if(~ $fscons '')
4
	fscons=fscons
5
if(~ $replica '')
6
	replica=replica
7
 
8
s=/n/dist/dist/replica
9
serverroot=/n/dist
10
serverlog=$s/plan9binary.log
11
serverproto=$s/plan9binary.proto
12
fn servermount {
13
	9fs sources
14
	bind /n/sources/plan9 /n/dist
15
}
16
fn serverupdate { status='' }
17
 
18
if ( ! test -e /srv/boot && ! test -e /srv/kfs ) {
19
	echo 'error: neither /srv/boot nor /srv/kfs present; make sure you are running on the file server'
20
	exit '/srv/boot or /srv/kfs not present'
21
}
22
 
23
if (test -e /srv/$fscons) {
24
	if ( ! test -w /srv/$fscons ) { 
25
		echo 'error: no write access to /srv/'^$fscons^', make sure you are the host owner' 
26
		exit 'no write access to /srv/fscons'
27
	}
28
 
29
	fn clientmount {
30
		if(! test -e /srv/$replica){
31
			echo 'srv -AWP '^$replica >>/srv/$fscons
32
			sleep 5
33
		}
34
		mount -c /srv/$replica /n/boot
35
	}
36
	c=/n/boot/dist/replica
37
	clientroot=/n/boot
38
} 
39
if not {
40
	fn clientmount { 9fs kfs }
41
	c=/n/kfs/dist/replica
42
	clientroot=/n/kfs
43
}
44
 
45
clientdb=$c/client/plan9binary.db
46
clientexclude=(dist/replica/client)
47
clientlog=$c/client/plan9binary.log
48
clientproto=$c/plan9binary.proto
49
 
50
applyopt=(-u -T$c/client/plan9binary.time)