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