bootfloppy 439 B

12345678910111213141516171819202122
  1. #!/bin/rc
  2. if(~ $#* 0 1) {
  3. echo 'usage: bootfloppy /dev/fd0disk plan9.ini [files...]'>[1=2]
  4. exit usage
  5. }
  6. if(! test -f $2) {
  7. echo $2 does not exist >[1=2]
  8. exit noplan9.ini
  9. }
  10. disk=$1
  11. ini=$2
  12. shift
  13. shift
  14. mkdir /tmp/bootfloppy.$pid
  15. cp $ini /tmp/bootfloppy.$pid/plan9.ini
  16. dd -bs 512 -count 1 < /dev/zero >/tmp/bootfloppy.$pid/plan9.nvr
  17. disk/format -b /386/pbs -f -d $disk /386/9load /tmp/bootfloppy.$pid/* $*
  18. rm -rf /tmp/bootfloppy.$pid