]> git.lizzy.rs Git - plan9front.git/blob - sys/src/9/boot/net.rc
added in a way to make net.rc wait for the network hardware to come up before running...
[plan9front.git] / sys / src / 9 / boot / net.rc
1 #!/bin/rc
2
3 fn confignet{
4         if(~ $#netwait 1)
5                 sleep $netwait
6
7         must ip/ipconfig -p $*
8         if(~ $#fs 0)
9                 fs=`{awk -F'=' '/fs=/{print $2; exit}' /net/ndb}
10         if(~ $#auth 0)
11                 auth=`{awk -F'=' '/auth=/{print $2; exit}' /net/ndb}
12         if(~ $#fs 0)
13                 ask fs ' ip is? ' $auth
14         if(~ $#auth 0)
15                 ask auth ' ip is? ' $fs
16 }
17
18 fn connecttcp{
19         srv -q tcp!$fs!564 boot 
20 }
21
22 fn connectil{
23         srv -q il!$fs!17008 boot 
24 }
25
26 mtcp=(confignet connecttcp)
27 mil=(confignet connectil)
28 mt=(mtcp mil $mt)