9fs 927 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/rc
  2. switch($1){
  3. case ''
  4. echo usage: 9fs service '[mountpoint]' >[1=2]
  5. exit usage
  6. case kfs
  7. if(! test -f /srv/kfs)
  8. disk/kfs
  9. mount -c /srv/kfs /n/kfs
  10. case netlib
  11. 9fs netlib2 && bind /n/netlib2/netlib /netlib
  12. case dump
  13. mount /srv/boot /n/dump dump >[2]/dev/null ||
  14. mount /srv/boot /n/dump main/archive ||
  15. mount /srv/boot /n/dump dump # again to print error
  16. case snap
  17. mount /srv/boot /n/snap main/snapshot
  18. case other
  19. mount -C /srv/boot /n/other other
  20. case juke
  21. srv -q il!jukefs && mount /srv/il!jukefs /n/njuke && bind -c /n/njuke/juke /n/juke
  22. case sources
  23. srv -nq tcp!sources.cs.bell-labs.com sources /n/sources
  24. case sourcesdump
  25. 9fs sources
  26. mount -n /srv/sources /n/sourcesdump main/archive
  27. case sourcessnap
  28. 9fs sources
  29. mount -n /srv/sources /n/sourcessnap main/snapshot
  30. case wiki
  31. srv -m 'net!plan9.bell-labs.com!wiki' wiki /mnt/wiki
  32. case *
  33. switch($#*){
  34. case 1
  35. srv -m $1
  36. case *
  37. srv -m $1 $1 $2
  38. }
  39. }