lpscratch 874 B

1234567891011121314151617181920212223242526272829303132333435
  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 *
  16. SCRATCHFILESYSTEM=other
  17. }
  18. SCRATCH=/n/^$SCRATCHFILESERVER^$SCRATCHFILESYSTEM
  19. # lp subdirectory where log, prob, queue and tmp reside
  20. LPSCRATCH=$SCRATCH/lp
  21. if (! test -d $SCRATCH/lp) {
  22. if (! test -r /srv/$SCRATCHFILESERVER) srv $SCRATCHFILESERVER
  23. if (! mount -c /srv/$SCRATCHFILESERVER $SCRATCH $SCRATCHFILESYSTEM) {
  24. echo 'cannot mount '$SCRATCH' filesystem' >[1=2]
  25. exit 'LP mount'
  26. }
  27. }
  28. if (! bind -a $LPSCRATCH $LPLIB) {
  29. echo 'cannot bind '$LPSCRATCH' onto '$LPLIB >[1=2]
  30. exit 'LP bind'
  31. }
  32. exit ''