summaryrefslogtreecommitdiff
path: root/sys/src/9/boot/tcp.rc
blob: 63a6b56c5d8224ed09b439ed09746bd096a943b9 (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
#!/bin/rc

fn configtcp{
	must ip/ipconfig -p $*
	
	if(~ $#fs 0)
		fs=`{awk -F'=' '/fs=/{print $2; exit}' /net/ndb}
	if(~ $#auth 0)
		auth=`{awk -F'=' '/auth=/{print $2; exit}' /net/ndb}
	if(~ $#fs 0)
		ask fs ' ip is?' $auth
	if(~ $#auth 0)
		ask auth ' ip is?' $fs
	
	fsaddr=tcp!$fs!564
	authaddr=tcp!$auth!567
}

fn connecttcp{
	srv -q $"fsaddr boot 
}

mtcp=(configtcp connecttcp)
mt=(mtcp $mt)