]> git.lizzy.rs Git - plan9front.git/blob - rc/bin/inst/startether
cat: remove stupid long cast
[plan9front.git] / rc / bin / inst / startether
1 #!/bin/rc
2
3 # desc: activate ethernet card
4 # prereq: configether
5
6 switch($1) {
7 case checkready
8         if(isipdevup $netdev) {
9                 startether=done
10                 export startether
11         }
12
13 case go
14         if(isipdevup $netdev)
15                 exit
16
17         log starting ethernet $ethermethod config
18         ip/ipconfig -6
19         switch($ethermethod) {
20         case manual
21                 ip/ipconfig -g $gwaddr ether $netdev $ipaddr $ipmask >>[2]/srv/log
22         case automatic
23                 >>[2]/srv/log @{
24                         test -e /env/nora6 || ip/ipconfig ra6 recvra 1 &
25                         ip/ipconfig &
26                         wait
27                 }
28         }
29
30 case checkdone
31         if(! isipdevup $netdev) {
32                 startether=notdone
33                 export startether
34         }
35 }