9fs 948 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 -m tcp!sources.cs.bell-labs.com sources /n/sources
  24. case sourcesdump
  25. 9fs sources
  26. mount /srv/sources /n/sourcesdump main/archive
  27. case sourcessnap
  28. 9fs sources
  29. mount /srv/sources /n/sourcessnap main/snapshot
  30. case wiki
  31. srv 'net!plan9.bell-labs.com!wiki' wiki
  32. mount /srv/wiki /mnt/wiki
  33. case *
  34. switch($#*){
  35. case 1
  36. srv -m $1
  37. case *
  38. srv $1
  39. mount -c /srv/$1 $2
  40. }
  41. }