#!/bin/rc TIMESYNCARGS='-n -a1000000' # accuracy in nanosec mntgen -s slashn && chmod 666 /srv/slashn # bind all likely devices (#S was bound in boot) for(i in H w f t m v L P U '$' Σ) /bin/bind -a '#'^$i /dev >/dev/null >[2=1] # set up any partitions for(disk in /dev/sd??) { if(test -f $disk/data && test -f $disk/ctl) disk/fdisk -p $disk/data >$disk/ctl >[2]/dev/null for(part in $disk/plan9*) if(test -f $part) disk/prep -p $part >$disk/ctl >[2]/dev/null } # start up local swapping if(test -f /dev/sd*/swap){ disk=`{ls /dev/sd*/swap >[2]/dev/null | sed 1q | sed 's!swap$!!'} swap $disk^swap >/dev/null >[2=1] rm /env/disk } # we do this before we have a name. we may need to do network # setup so that we can get a name. if(test -e /rc/bin/termrc.local) . /rc/bin/termrc.local # cs sets sysname (termrc.local may already have started it so check) if(! test -e /srv/cs) ndb/cs sysname=`{cat /dev/sysname} <<<<<<< /rc/bin/termrc # machine specific startup (e.g., for devices not probed) if(test -e /cfg/$sysname/termrc) . /cfg/$sysname/termrc # start dns if we have an internet if(test -e /net/ipifc/0/ctl && ! test -e /srv/dns) ndb/dns -r # start timesync if it isn't running and we weren't told not to if(! ps|grep -s timesync){ if(! ~ $TIMESYNCARGS '') aux/timesync $TIMESYNCARGS } ||||||| termrc.orig # start IP on the LAN. It's commented out to avoid a long timeout # on startup waiting for DHCP. # # If your system has DHCP # #if(! test -e /net/ipifc/0/ctl) # ip/ipconfig >/dev/null >[2=1] # # Otherwise use # #if(! test -e /net/ipifc/0/ctl) # ip/ipconfig -g your-gateway ether /net/ether0 your-ip-address your-subnet-mask >/dev/null >[2=1] if(test -e /net/ipifc/0/ctl) ndb/dns -rf $NDBFILE aux/timesync $TIMESYNCARGS switch($terminal){ case carrera* bind -a '#t' /dev case *' ss'* /bin/bind -a '#w' /dev >/dev/null >[2=1] /bin/bind -a '#t' /dev >/dev/null >[2=1] case *' magnum'* /bin/bind -a '#m' /dev >/dev/null >[2=1] /bin/bind -a '#t' /dev >/dev/null >[2=1] aux/mouse -dC 0 case *' indigo'* /bin/bind -a '#L' /dev >/dev/null >[2=1] /bin/bind -a '#w1' /dev >/dev/null >[2=1] /bin/bind -a '#t' /dev >/dev/null >[2=1] /bin/bind -a '#A' /dev >/dev/null >[2=1] case NCR* 'AT&TNSX'* generic* _MP_* 'alpha apc'* for(i in H w f t m v L S P U '$' Σ) /bin/bind -a '#'^$i /dev >/dev/null >[2=1] for(disk in /dev/sd??) { if(test -f $disk/data && test -f $disk/ctl) disk/fdisk -p $disk/data >$disk/ctl >[2]/dev/null for(part in $disk/plan9*) if(test -f $part) disk/prep -p $part >$disk/ctl >[2]/dev/null } ======= # start IP on the LAN. It's commented out to avoid a long timeout # on startup waiting for DHCP. # # If your system has DHCP # #if(! test -e /net/ipifc/0/ctl) # ip/ipconfig >/dev/null >[2=1] # # Otherwise use # #if(! test -e /net/ipifc/0/ctl) # ip/ipconfig -g your-gateway ether /net/ether0 your-ip-address your-subnet-mask >/dev/null >[2=1] if(test -e /net/ipifc/0/ctl) ndb/dns -rf $NDBFILE aux/timesync $TIMESYNCARGS switch($terminal){ case carrera* bind -a '#t' /dev case *' ss'* /bin/bind -a '#w' /dev >/dev/null >[2=1] /bin/bind -a '#t' /dev >/dev/null >[2=1] case *' magnum'* /bin/bind -a '#m' /dev >/dev/null >[2=1] /bin/bind -a '#t' /dev >/dev/null >[2=1] aux/mouse -dC 0 case *' indigo'* /bin/bind -a '#L' /dev >/dev/null >[2=1] /bin/bind -a '#w1' /dev >/dev/null >[2=1] /bin/bind -a '#t' /dev >/dev/null >[2=1] /bin/bind -a '#A' /dev >/dev/null >[2=1] case NCR* 'AT&TNSX'* generic* _MP_* 'alpha apc'* for(i in H w f t m v L S P U '$' Σ κ) /bin/bind -a '#'^$i /dev >/dev/null >[2=1] for(disk in /dev/sd??) { if(test -f $disk/data && test -f $disk/ctl) disk/fdisk -p $disk/data >$disk/ctl >[2]/dev/null for(part in $disk/plan9*) if(test -f $part) disk/prep -p $part >$disk/ctl >[2]/dev/null } >>>>>>> termrc # add the loop back device if(grep -s loopback /dev/drivers) ip/ipconfig loopback /dev/null 127.1 # set things up for vmware if(! ~ `{cat /dev/user} none){ if(test -e /bin/aux/vmware) aux/vmware } 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(test -f /dev/mousectl){ switch($mouseport){ case ps2 ps2intellimouse 0 1 2 aux/mouse $mouseport # parse vgasize into fields vgasize=`{echo $vgasize} if(! ~ $"monitor '' && ! ~ `{cat /dev/user} none rsc) aux/vga -l $vgasize if(~ $accupoint 1) pipefile -dr /bin/aux/accupoint /dev/mouse } } if(test -f '#P/psaux'){ aux/nmouse $mouseport # parse vgasize into fields vgasize=`{echo $vgasize} if(! ~ $"monitor '' && ! ~ `{cat /dev/user} none rsc) aux/vga -l $vgasize }