Update /dist/replica/cd to allow a `pull' from a Plan 9 iso on CD to a fossil file server. The relevant sections from /dist/replica/network have been inserted, and the file has been made executable. Reference: /n/sources/patch/applied/replica-cd-fossil Date: Sun May 28 19:02:22 CES 2006 Signed-off-by: mt@wmipf.in-berlin.de --- /dist/replica/cd Sun May 28 18:52:48 2006 +++ /dist/replica/cd Sun May 28 18:52:41 2006 @@ -7,12 +7,30 @@ fn servermount { status='' } fn serverupdate { status='' } -fn clientmount { 9fs kfs } -c=/n/kfs/dist/replica -clientroot=/n/kfs -clientproto=$c/plan9.proto +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' + 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 +clientproto=$c/plan9.proto applyopt=(-u -T$c/client/plan9.time)