|
@@ -10,9 +10,27 @@ fn servermount {
|
|
|
}
|
|
|
fn serverupdate { status='' }
|
|
|
|
|
|
-fn clientmount { 9fs boot }
|
|
|
-c=/n/boot/dist/replica
|
|
|
-clientroot=/n/boot
|
|
|
+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/boot) {
|
|
|
+ if ( ! test -w /srv/fscons ) {
|
|
|
+ echo 'error: no write access to /srv/fscons, make sure you are the host owner'
|
|
|
+ exit 'no write access to /srv/fscons'
|
|
|
+ }
|
|
|
+
|
|
|
+ fn clientmount { echo 'srv -AWP replica'>>/srv/fscons; mount -c /srv/replica /n/boot }
|
|
|
+ c=/n/boot/dist/replica
|
|
|
+ clientroot=/n/boot
|
|
|
+}
|
|
|
+if not {
|
|
|
+ fn clientmount { 9fs kfs }
|
|
|
+ c=/n/kfs/dist/replica
|
|
|
+ clientroot=/n/kfs
|
|
|
+}
|
|
|
+
|
|
|
clientdb=$c/client/plan9.db
|
|
|
clientexclude=(dist/replica/client)
|
|
|
clientlog=$c/client/plan9.log
|