summaryrefslogtreecommitdiff
path: root/rc/bin/inst/confignet
blob: b6b738fa89503d59612d3f90a38577fce34bee60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/rc

# desc: configure the network

switch($1){
case checkready checkdone
	if(~ $netisfrom none){
		confignet=done
		export confignet
		exit
	}
	if(~ $netisfrom ether){
		x=config$netisfrom
		$x=done
		./config$netisfrom checkdone
		confignet=$$x
		export confignet
		exit
	}
	confignet=ready
	export confignet
	exit

case go
	if(! test -d /net/ether0 >[2]/dev/null){
		echo
		echo 'Could not find ethernet card.'
		echo
		netisfrom=none
		export netisfrom
		exit
	}
	echo
	echo 'We will configure the ethernet.'
	echo
	netisfrom=ether
	export netisfrom
	exec ./configether go
}