lpscratch 908 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/rc
  2. #
  3. # set up scratch area that is on disk that is not backed-up
  4. #
  5. # file server of scratch file system
  6. LPLIB=/sys/lib/lp # lp scripts directories and configuration file are here
  7. if (~ $#fileserver 0)
  8. SCRATCHFILESERVER=emelie
  9. if not
  10. SCRATCHFILESERVER=$fileserver
  11. # scratch file system name
  12. switch($SCRATCHFILESERVER){
  13. case kfs
  14. SCRATCHFILESYSTEM=''
  15. case fossil
  16. SCRATCHFILESYSTEM=''
  17. case *
  18. SCRATCHFILESYSTEM=other
  19. }
  20. SCRATCH=/n/^$SCRATCHFILESERVER^$SCRATCHFILESYSTEM
  21. # lp subdirectory where log, prob, queue and tmp reside
  22. LPSCRATCH=$SCRATCH/lp
  23. if (! test -d $SCRATCH/lp) {
  24. if (! test -r /srv/$SCRATCHFILESERVER) srv $SCRATCHFILESERVER
  25. if (! mount -c /srv/$SCRATCHFILESERVER $SCRATCH $SCRATCHFILESYSTEM) {
  26. echo 'cannot mount '$SCRATCH' filesystem' >[1=2]
  27. exit 'LP mount'
  28. }
  29. }
  30. if (! bind -a $LPSCRATCH $LPLIB) {
  31. echo 'cannot bind '$LPSCRATCH' onto '$LPLIB >[1=2]
  32. exit 'LP bind'
  33. }
  34. exit ''