Plan 9 from Bell Labs’s /usr/web/sources/patch/applied/dist-termrc/termrc.orig

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


#!/bin/rc

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

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
	}
}

# 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


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].