Plan 9 from Bell Labs’s /usr/web/sources/extra/fs/replica/cd

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc

s=/n/sources/extra/fs/replica
serverroot=/n/sources/extra/fs/fs
serverlog=$s/fs.log
serverdb=$s/fs.db
serverproto=$s/fs.proto
fn servermount { 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' 
		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/fs.db
clientexclude=(dist/replica/client)
clientlog=$c/client/fs.log
clientproto=$c/fs.proto

applyopt=(-u -T$c/client/fs.time)

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].