3 # desc: subdivide plan 9 disk partition
8 echo -a 9fat -a nvram -a fossil -a swap
9 if(~ $fstype fossil+venti)
10 echo -a 9fat -a nvram -a arenas -a isect -a fossil -a swap # -a other
15 if(! test -f /dev/sd*/plan9*){
21 echo 'The following Plan 9 disk partitions were found.'
23 disks=(/dev/sd*/plan9*)
26 echo q | disk/prep -r $i >[2]/dev/null
33 prompt $default 'Plan 9 partition to subdivide' $disks
36 echo 'This is disk/prep; use it to subdivide the Plan 9 partition.'
37 echo 'If it is not yet subdivided, a sensible layout will be suggested;'
38 echo 'you can probably just type ''w'' and then ''q''.'
40 disk/prep `{autotype} $disk
41 disk/prep -p $disk >`{basename -d $disk}^/ctl >[2]/dev/null
44 if(! test -f /dev/sd*/9fat)
47 if(! ~ $prepdisk ready){
51 if(! test -f /dev/sd*/fossil* && ! test -f /dev/fs/fossil*)
54 if(! test -f /dev/sd*/fossil* && ! test -f /dev/fs/fossil*)
56 if(! test -f /dev/sd*/arenas && ! test -f /dev/fs/arenas*)
58 if(! test -f /dev/sd*/isect && ! test -f /dev/fs/isect*)