cd 922 B

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