clean up termrc - sources incanations for swap (probablly depricated anyway) - use $user not /dev/user - test for empty sysname - just start ipconfig in the background if installing. the idea is to pick up dhcp addresses in the background. this should be long over before we configure ip addresses. Reference: /n/atom/patch/applied/termrcclean Date: Thu Feb 27 18:46:28 CET 2014 Signed-off-by: quanstro@quanstro.net --- /rc/bin/termrc Thu Feb 27 18:44:58 2014 +++ /rc/bin/termrc Thu Feb 27 18:44:59 2014 @@ -6,28 +6,30 @@ ndbfile=/lib/ndb/local # site=quanstro.net # LPDEST=printer +NPROC = `{wc -l /dev/sysname } -if(~ $#cdboot 1) - install=1 -if(! test -e /net/ipifc/0/ctl || ~ 127.0.0.1 `{cat /net/ipifc/0/local}) - ip/ipconfig +if(! test -e /net/ipifc/0/ctl || ~ 127.0.0.1 `{cat /net/ipifc/0/local}){ + if(~ $#install 0) + ip/ipconfig + if not + ip/ipconfig & # if installing, don't delay 32s for dhcp +} if(test -e /net/ipifc/0/ctl) ndb/dns -rf $ndbfile for(i in /net/ether?) if(test -f $i/mtu) echo mtu `{sed 's/.* //g'<$i/mtu}>$i/clone -# parallelism for mk -NPROC = `{wc -l '#r/rtc' } @@ -37,11 +39,6 @@ for(i in A w f t m u v L '$' Ι Σ κ æ ©) /bin/bind -a '#'^$i /dev >/dev/null >[2=1] diskparts -sysname=`{cat /dev/sysname} -if (~ $#sysname 0 || ~ $sysname '') { - sysname = gnot - echo -n $sysname >/dev/sysname -} # hacks switch($sysname){ @@ -50,7 +47,7 @@ echo pin 21>/dev/audioctl } -if(! ~ `{cat /dev/user} none && test -x /bin/aux/vmware) +if(! ~ $user none && test -x /bin/aux/vmware) aux/vmware usbstart if(! ~ $terminal 'ARM '*){ @@ -76,13 +73,11 @@ monitor=xga } if(test -f /dev/mousectl && ~ $mouseport ps2 ps2intellimouse 0 1 2 usb){ - if(~ $mouseport usb) - usbstart - if not + if(! ~ $mouseport usb) aux/mouse $mouseport # parse vgasize into fields vgasize=`{echo $vgasize} - if(! ~ $"monitor '' && ! ~ `{cat /dev/user} none)@{ + if(! ~ $"monitor '' && ! ~ $user none)@{ rfork n if(~ $monitor vesa) aux/realemu @@ -92,17 +87,13 @@ pipefile -dr /bin/aux/accupoint /dev/mouse } } -disk='' -if(test -f '#S/'*/swap) - disk=`{ls -Q '#S/'*/swap >[2]/dev/null | sed 1q | sed 's!swap$!!'} -if(! ~ $disk '') { - swap $disk^swap >/dev/null >[2=1] - dossrv - c: +disk=`{ls /dev/sd*/swap >[2]/dev/null} { + if (! ~ $#disk 0) + swap $disk(1) >/dev/null >[2=1] } -if(test -f '#©/cecctl') @{ +@{ echo name $sysname # echo cecon /net/ether0 -}>'#©/cecctl'>[2]/dev/null +}>/dev/cecctl>[2]/dev/null dmaon