diskparts 624 B

1234567891011121314151617181920212223
  1. #!/bin/rc
  2. # set up any disk partitions
  3. rfork e
  4. if (! test -e /dev/sdctl)
  5. bind -a '#S' /dev
  6. # set up any /dev/sd partitions
  7. for(disk in /dev/sd[0-9A-Zabd-z]*) {
  8. if(test -f $disk/data && test -f $disk/ctl)
  9. disk/fdisk -p $disk/data >$disk/ctl >[2]/dev/null
  10. for(part in $disk/plan9*)
  11. if(test -f $part)
  12. disk/prep -p $part >$disk/ctl >[2]/dev/null
  13. }
  14. sysname=`{cat /dev/sysname}
  15. # set up any fs(3) partitions
  16. if (! test -e /dev/fs/ctl && test -e '#k/fs')
  17. bind -a '#k' /dev
  18. if (~ $#sysname 1 && ! ~ $sysname '' &&
  19. test -r /cfg/$sysname/fsconfig && test -w /dev/fs/ctl)
  20. read -m /cfg/$sysname/fsconfig >/dev/fs/ctl