#!/bin/rc # termrc if(~ $#debug 1 && ~ $debug yes) flag x + if not debug=0 if(~ $debug yes) echo env... sysname=gnot font=/lib/font/bit/lucidasans/typelatin1.7.font for (i in '#P' '#f' '#m' '#t' '#v') { if(~ $debug yes) echo bind $i bind -a $i /dev >/dev/null >[2=1] } if(~ $debug yes) echo binddev done for(disk in /dev/sd??) { if(test -f $disk/data && test -f $disk/ctl){ disk/fdisk -p $disk/data >$disk/ctl >[2]/dev/null # if(~ $#nosddma 0) # echo dma on >$disk/ctl # if(~ $#nosdrwm 0) # echo rwm on >$disk/ctl } } for (i in /sys/log/*) { if(~ $debug yes) echo bind $i bind /dev/null $i } if(~ $debug yes) echo bindlog done bind -a '#l' /net >/dev/null >[2=1] dossrv boota: boota: # again, just in case a timeout made the earlier one fail cp /n/a:/plan9.ini /tmp/plan9.orig if(! ~ $cdboot yes){ pci >/n/a:/pci.txt >[2]/dev/null cp /dev/kmesg /n/a:/boot.txt >[2]/dev/null } # restore a partial install if(test -f /n/a:/9inst.cnf) cp /n/a:/9inst.cnf /tmp/vars # make vgadb easier to edit if(test -f /n/a:/vgadb) cp /n/a:/vgadb /lib/vgadb aux/vmware # configure loopback device without touching /net/ndb { echo bind loopback /dev/null echo add 127.0.0.1 255.255.255.0 } >/net/ipifc/clone if(~ $#dmamode 0) dmamode=ask if(~ $dmamode ask){ echo -n 'use DMA for ide drives[yes]: ' dmamode=`{read} if(~ $#dmamode 0) dmamode=yes } if(~ $dmamode yes) for(i in /dev/sd*/ctl) if(test -f $i) {echo dma on; echo rwm on >[2]/dev/null} >$i if(~ $installmode ask){ echo -n 'install mode is (text, graphics)[graphics]: ' installmode=`{read} if(~ $#installmode 0) installmode=graphics } if(~ $installmode text){ mouseport=() vgasize=() monitor=() } if not installmode=graphics if(~ $mouseport ask){ echo -n 'mouseport is (ps2, ps2intellimouse, 0, 1, 2)[ps2]: ' mouseport=`{read} if(~ $#mouseport 0) mouseport=ps2 } if(~ $vgasize ask){ echo -n 'vgasize [640x480x8]: ' vgasize=`{read} if(~ $#vgasize 0) vgasize=640x480x8 } if(~ $monitor ask){ echo -n 'monitor is [xga]: ' monitor=`{read} if(~ $#monitor 0) monitor=xga } if(~ $#mouseport 1) { aux/mouse $mouseport if(~ $#vgasize 1 && ! ~ $vgasize '') { vgasize=`{echo $vgasize} if(! ~ $cdboot yes) aux/vga -vip $vgasize >/n/a:/vgainfo.txt sleep 2 # wait for floppy to finish aux/vga -l $vgasize if(! ~ $#novgaaccel 0) echo -n 'hwaccel off' >'#v/vgactl' >[2]/dev/null if(! ~ $#novgablank 0) echo -n 'hwblank off' >'#v/vgactl' >[2]/dev/null } }