copydist 713 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/rc
  2. # prereq: mountdist
  3. # desc: copy the distribution into the file system
  4. switch($1){
  5. case checkready
  6. if(! test -d /n/dist/dist/replica){
  7. copydist=notdone
  8. export copydist
  9. exit
  10. }
  11. if(test -f /n/newfs/dist/replica/didplan9){
  12. copydist=done
  13. export copydist
  14. exit
  15. }
  16. case go
  17. inst/watchfd applylog 0 `{ls -l /n/dist/dist/replica/plan9.log | awk '{print $6}'} 'Installing file system' &
  18. replica/pull -c /rc/bin/inst/replcfg
  19. if(~ $status '' *conflicts || test -f /n/newfs/dist/replica/didplan9witherrors)
  20. >/n/newfs/dist/replica/didplan9
  21. if not
  22. >/n/newfs/dist/replica/didplan9witherrors
  23. case checkdone
  24. if(! test -f /n/newfs/dist/replica/didplan9){
  25. copydist=notdone
  26. export copydist
  27. }
  28. }