Subversion Repositories planix.SVN

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#!/bin/rc
2
# termrc
3
if(~ $#debug 1 && ~ $debug yes)
4
	flag x +
5
if not
6
	debug=0
7
 
8
if(~ $debug yes) echo env...
9
sysname=gnot
10
font=/lib/font/bit/lucidasans/typelatin1.7.font
11
 
12
for (i in '#P' '#f' '#m' '#t' '#v') {
13
	if(~ $debug yes) echo bind $i
14
	bind -a $i /dev >/dev/null >[2=1]
15
}
16
if(~ $debug yes) echo binddev done
17
 
18
for(disk in /dev/sd??) {
19
	if(test -f $disk/data && test -f $disk/ctl){
20
		disk/fdisk -p $disk/data >$disk/ctl >[2]/dev/null
21
#		if(~ $#nosddma 0)
22
#			echo dma on >$disk/ctl
23
#		if(~ $#nosdrwm 0)
24
#			echo rwm on >$disk/ctl
25
	}
26
}
27
 
28
for (i in /sys/log/*) {
29
	if(~ $debug yes) echo bind $i
30
	bind /dev/null $i
31
}
32
 
33
if(~ $debug yes) echo bindlog done
34
 
35
bind -a '#l' /net >/dev/null >[2=1]
36
 
37
dossrv
38
boota:
39
boota:	# again, just in case a timeout made the earlier one fail
40
cp /n/a:/plan9.ini /tmp/plan9.orig
41
if(! ~ $cdboot yes){
42
	pci >/n/a:/pci.txt >[2]/dev/null
43
	cp /dev/kmesg /n/a:/boot.txt >[2]/dev/null
44
}
45
 
46
# restore a partial install
47
if(test -f /n/a:/9inst.cnf)
48
	cp /n/a:/9inst.cnf /tmp/vars
49
 
50
# make vgadb easier to edit
51
if(test -f /n/a:/vgadb)
52
	cp /n/a:/vgadb /lib/vgadb
53
 
54
aux/vmware
55
 
56
# configure loopback device without touching /net/ndb
57
{
58
	echo bind loopback /dev/null
59
	echo add 127.0.0.1 255.255.255.0 
60
} >/net/ipifc/clone
61
 
62
if(~ $#dmamode 0)
63
	dmamode=ask
64
if(~ $dmamode ask){
65
	echo -n 'use DMA for ide drives[yes]: '
66
	dmamode=`{read}
67
	if(~ $#dmamode 0)
68
		dmamode=yes
69
}
70
if(~ $dmamode yes)
71
	for(i in /dev/sd*/ctl)
72
		if(test -f $i)
73
			{echo dma on; echo rwm on >[2]/dev/null} >$i
74
 
75
if(~ $installmode ask){
76
	echo -n 'install mode is (text, graphics)[graphics]: '
77
	installmode=`{read}
78
	if(~ $#installmode 0)
79
		installmode=graphics
80
}
81
if(~ $installmode text){
82
	mouseport=()
83
	vgasize=()
84
	monitor=()
85
}
86
if not
87
	installmode=graphics
88
 
89
if(~ $mouseport ask){
90
	echo -n 'mouseport is (ps2, ps2intellimouse, 0, 1, 2)[ps2]: '
91
	mouseport=`{read}
92
	if(~ $#mouseport 0)
93
		mouseport=ps2
94
}
95
if(~ $vgasize ask){
96
	echo -n 'vgasize [640x480x8]: '
97
	vgasize=`{read}
98
	if(~ $#vgasize 0)
99
		vgasize=640x480x8
100
}
101
if(~ $monitor ask){
102
	echo -n 'monitor is [xga]: '
103
	monitor=`{read}
104
	if(~ $#monitor 0)
105
		monitor=xga
106
}
107
if(~ $#mouseport 1) {
108
	aux/mouse $mouseport
109
	if(~ $#vgasize 1 && ! ~ $vgasize '') {
110
		vgasize=`{echo $vgasize}
111
		if(! ~ $cdboot yes)
112
			aux/vga -vip $vgasize >/n/a:/vgainfo.txt
113
		sleep 2	# wait for floppy to finish
114
		aux/vga -l $vgasize
115
		if(! ~ $#novgaaccel 0)
116
			echo -n 'hwaccel off' >'#v/vgactl' >[2]/dev/null
117
		if(! ~ $#novgablank 0)
118
			echo -n 'hwblank off' >'#v/vgactl' >[2]/dev/null
119
	}
120
}