1
0

binary 1.1 KB

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