Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2007/0413/1

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


/rc/bin/termrc
% cat >/sys/lib/dist/changes/1176444006.0.txt << EOF
•	Remove local terminal startup settings for inclusion in termrc.local.
•	Condense some rather nasty case / if statements.
EOF
 [geoff] --rwxrwxr-x M 121 glenda sys 1665 Apr 13 02:01 rc/bin/termrc
	/n/sourcesdump/2007/0413/plan9/rc/bin/termrc:1,12 - 
	/n/sources/plan9/rc/bin/termrc:1,5
	- #!/bin/rc -x
	- 
	- # replace FILESERVER with the name of your file server
	- # here we start with kfs, your local disk file system
	- fileserver=kfs
	- # replace CPU with the name of your cpu server
	- cpu=CPU
	- # replace FACEDOM with the local domain to be used in the faces database
	- facedom=FACEDOM
	+ #!/bin/rc
	+ # terminal startup
	  TIMESYNCARGS=(-rLa1000000)
	  NDBFILE=/lib/ndb/local
	  
	/n/sourcesdump/2007/0413/plan9/rc/bin/termrc:15,21 - 
	/n/sources/plan9/rc/bin/termrc:8,13
	  
	  mntgen -s slashn && chmod 666 /srv/slashn
	  
	- 
	  # cs sets sysname
	  ndb/cs -f $NDBFILE
	  sysname=`{cat /dev/sysname}
	/n/sourcesdump/2007/0413/plan9/rc/bin/termrc:38,102 - 
	/n/sources/plan9/rc/bin/termrc:30,78
	  
	  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]
	+ # 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
	+ diskparts
	  
	- 	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
	+ # 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
	  	}
	- 	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, mount dos fat fs
	- 	disk=`{ls /dev/sd*/swap >[2]/dev/null}
	- 	if (! ~ $#disk 0) {
	- 		swap $disk(1) >/dev/null >[2=1]
	- 		dossrv
	- 		c:
	- 	}
	- 	rm /env/disk
	  }
	+ 
	+ # 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
 [geoff] --rwxrwxr-x M 121 glenda sys 1665 Apr 13 02:01 rc/bin/termrc


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].