4 # set up any disk partitions
5 if (! test -e /dev/sdctl)
8 # set up any /dev/sd partitions.
9 # note that really big disks (e.g., aoe devices) may have no mbr
10 # partition table because the mbr partition table can't cope with large
11 # block numbers, so we may have to examine the data file with prep if
12 # there's no plan9 file. beware that `disk/prep -p data' on a disk with
13 # no plan 9 partition table will delete all extant partitions.
14 for(disk in /dev/sd*) {
15 if(test -f $disk/data && test -f $disk/ctl)
16 { disk/fdisk -p $disk/data |
17 grep -v '^delpart ' >$disk/ctl } >[2]/dev/null
18 if(test -f $disk/plan9)
24 { disk/prep -p $part |
25 grep -v '^delpart ' >$disk/ctl } >[2]/dev/null
28 sysname=`{cat /dev/sysname}
30 # set up any fs(3) partitions
31 if (! test -e /dev/fs/ctl && test -e '#k/fs')
33 if (~ $#sysname 1 && ! ~ $sysname '' &&
34 test -r /cfg/$sysname/fsconfig && test -w /dev/fs/ctl)
35 awk '{print $0; fflush}' /cfg/$sysname/fsconfig >/dev/fs/ctl