boota: 537 B

1234567891011121314151617181920212223
  1. #!/bin/rc
  2. # boota:
  3. rfork e
  4. if(! test -f /srv/dos)
  5. dossrv >/dev/null </dev/null >[2]/dev/null
  6. unmount /n/a:>[2]/dev/null
  7. switch($bootfile) {
  8. case sd*!cdboot!*
  9. # just look for the right file. bootfile isn''t trustworthy
  10. adisk=/dev/sd*/9fat
  11. if(! ~ $#adisk 1)
  12. adisk=$adisk(1)
  13. case sd*
  14. adisk=`{echo $bootfile | sed 's#(sd..).*#/dev/\1/dos#'}
  15. case fd*
  16. adisk=`{echo $bootfile | sed 's#(fd.).*#/dev/\1disk#'}
  17. case *
  18. echo 'unknown bootfile '^$bootfile^'; mail 9trouble@plan9.bell-labs.com'
  19. exit oops
  20. }
  21. mount -c /srv/dos /n/a: $adisk