--- /sys/lib/backup/backup Fri Jul 12 22:11:43 2013 +++ /sys/lib/backup/backup Tue Nov 12 02:49:57 2013 @@ -67,7 +67,7 @@ sed 1,$disc1trks^d arenas >morearenas mv morearenas arenas - arenas=`{cat arenas} + arenas_todo=`{cat arenas} } } @@ -75,8 +75,8 @@ tobackup $set >arenas quitonfailure $status -arenas=`{cat arenas} -if (~ $#arenas 0) { +arenas_todo=`{cat arenas} +if (~ $#arenas_todo 0) { echo no sealed arenas not yet on disc exist on $fs exit '' } @@ -95,7 +95,7 @@ } progress=yes -while (test $#arenas -gt 0 && ~ $progress yes) { +while (test $#arenas_todo -gt 0 && ~ $progress yes) { backup1 quitonfailure $status } --- /sys/lib/backup/backuparenas Wed Nov 7 00:01:01 2012 +++ /sys/lib/backup/backuparenas Tue Nov 12 02:53:16 2013 @@ -39,17 +39,23 @@ exit bad-nwa cd $fsroot/dev/fs +shname = `{basename $arenas} +if (! test -r $shname){ + echo $0: $shname in `{pwd} not readable >[1=2] + exit unreadable-arenas +} + for (name) { grep next /mnt/cd/ctl # use -o 8192 to avoid devmnt fragmentation if bd drive is imported - venti/rdarena arena0 $name | + venti/rdarena $shname $name | pump -i 65536 -o 8192 -k 100000 -d 5 >/mnt/cd/wd/$name # pump -i 65536 -o 1048576 -k 51200 -d 10 >/mnt/cd/wd/$name quitonfailure $status # ls -l /mnt/cd if (test -e '/env/fn#dumpdone' -a -e '/env/set') - dumpdone arena0 $name + dumpdone $shname $name } echo 'remember to *not* remove /mnt/cd/wd' >[1=2] # don't remove /mnt/cd/wd, since that would finalize the disc --- /sys/lib/dist/mkfile Tue Jul 30 07:21:36 2013 +++ /sys/lib/dist/mkfile Wed Nov 13 22:19:23 2013 @@ -11,8 +11,9 @@ ncd-dist:V: $scr/plan9-new.iso.bz2 mk $dist/web.protect/plan9-new.iso.bz2 -usb-dist:V: - cd pc; mk usbdisk +$scr/usbdisk.bz2:D: $scr/plan9.iso.bz2 + cd pc; mk $target +usb-dist:V: $dist/web.protect/usbdisk.bz2 #contrib-cd:V: $scr/contrib.iso.bz2 # mk $dist/web.protect/contrib.iso.bz2 @@ -36,7 +37,6 @@ disk/mk9660 -9cj -v $title -s $src9 -B pbsraw -x 9load $target # copy (compressed) file from scratch space to the distribution, carefully -# $dist/web.protect/%.iso.bz2: $scr/%.iso.bz2 $dist/web.protect/%: $scr/% >>$target.new chmod +t $target.new # waste write buf, not venti store --- /sys/lib/dist/pc/mkfile Thu Oct 17 21:44:48 2013 +++ /sys/lib/dist/pc/mkfile Wed Nov 13 22:20:25 2013 @@ -80,20 +80,33 @@ /sys/src/9/pc/^(9pcflop 9pccd)^.gz subst/plan9.ini /lib/vgadb ls -l $target -usbdisk:D: /n/sources/plan9 +$scr/usbdisk:D: /n/sources/plan9 + @ { + rfork n if (~ $#scr 0 || ~ $scr '') { echo '$scr unset' >[1=2] exit not-set-up } cd $scr - mkusbboot -s 1900 -r /n/sources/plan9 && mv image $target - rm -f $target.bz2 - bzip2 $target && rm -f $target - pwd - ls -l $target* - if (test `{ls -s $target.bz2 | awk '{print $1}'} -lt 80000) { - echo $target.bz2 implausibly small >[1=2] - exit bz2-too-small + bind /dev/null /dev/cons + bind /dev/null /dev/consctl + { mkusbboot -s 1900 -r /n/sources/plan9; mv image $target } >[2=1] | + grep -v 'mkfs: /sys/lib/sysconfig/proto/.*can''t stat' + exit '' + } +$scr/usbdisk.bz2:D: $scr/usbdisk + @ { + rm -f $target + bzip2 $prereq && rm -f $prereq + ls -l $target + targsz = `{{ls -s $target; echo 0} | awk '{print $1; exit}'} + if (test $targsz -lt 80000) { + echo $target implausibly small: >[1=2] + ls -l $target >[1=2] + rm -f $target + exit $target-too-small + } + exit '' } clean:V: --- /sys/lib/dist/setup Tue Apr 30 22:05:56 2013 +++ /sys/lib/dist/setup Wed Nov 13 22:18:33 2013 @@ -7,19 +7,23 @@ 9fs outfsother if (test -e /cfg/$sysname/config) - . /cfg/$sysname/config -if not - outip=204.178.31.2 + . /cfg/$sysname/config +if not { + outsys=outside + out=$outsys.cs.bell-labs.com + outfs=outfs # outside is a client of outfs +} -import -c tcp!$outip!666 $dist/web.protect -if (! test -e $dist/web.protect/plan9.iso) { - echo import web.protect failed: $dist/web.protect/plan9.iso missing \ - >[1=2] +# for some reason, -c doesn't actually enable creation +#import -c tcp!$out!666 $dist/web.protect +#if (! test -e $dist/web.protect/plan9.iso) { +# echo import web.protect failed: $dist/web.protect/plan9.iso missing \ +# >[1=2] - bind /n/outfsother/web.protect $dist/web.protect # HACK + bind -c /n/outfsother/web.protect $dist/web.protect # HACK if (! test -e $dist/web.protect/plan9.iso) { echo bind outfsother failed: $dist/web.protect/plan9.iso \ missing >[1=2] exit no-web-protect } -} +#}