network 956 B

123456789101112131415161718192021222324252627282930313233343536373839
  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 {
  7. 9fs sources
  8. bind /n/sources/plan9 /n/dist
  9. }
  10. fn serverupdate { status='' }
  11. if ( ! test -e /srv/boot && ! test -e /srv/kfs ) {
  12. echo 'error: neither /srv/boot nor /srv/kfs present; make sure you are running on the file server'
  13. exit '/srv/boot or /srv/kfs not present'
  14. }
  15. if (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. fn clientmount { echo 'srv -AWP replica'>>/srv/fscons; mount -c /srv/replica /n/boot }
  21. c=/n/boot/dist/replica
  22. clientroot=/n/boot
  23. }
  24. if not {
  25. fn clientmount { 9fs kfs }
  26. c=/n/kfs/dist/replica
  27. clientroot=/n/kfs
  28. }
  29. clientdb=$c/client/plan9.db
  30. clientexclude=(dist/replica/client)
  31. clientlog=$c/client/plan9.log
  32. clientproto=$c/plan9.proto
  33. applyopt=(-u -T$c/client/plan9.time)