12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- #!/bin/rc
- # terminal startup
- TIMESYNCARGS=(-rLa1000000)
- NDBFILE=/lib/ndb/local
- if(test -e /rc/bin/termrc.local)
- . /rc/bin/termrc.local
- mntgen -s slashn && chmod 666 /srv/slashn
- # cs sets sysname
- ndb/cs -f $NDBFILE
- sysname=`{cat /dev/sysname}
- # 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
- if(! ps|grep -s timesync)
- aux/timesync $TIMESYNCARGS
- # bind all likely devices (#S was bound in boot)
- for(i in f t m v L P U '$' Σ κ)
- /bin/bind -a '#'^$i /dev >/dev/null >[2=1]
- diskparts
- # watch this space
- if(! ~ `{cat /dev/user} none)
- 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)
- aux/vga -l $vgasize
- if(~ $accupoint 1)
- pipefile -dr /bin/aux/accupoint /dev/mouse
- }
- }
- # start up local swapping
- disk=`{ls /dev/sd*/swap >[2]/dev/null}
- if (! ~ $#disk 0)
- swap $disk(1) >/dev/null >[2=1]
- rm /env/disk
|