]> git.lizzy.rs Git - plan9front.git/blob - rc/bin/inst/startether
inst/mounthjfs: use /dev/swap instead of #c/swap to determine memory size (thanks...
[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         switch($ethermethod) {
19         case manual
20                 ip/ipconfig -g $gwaddr ether $netdev $ipaddr $ipmask >>[2]/srv/log
21         case dhcp
22                 ip/ipconfig >>[2]/srv/log
23         }
24
25 case checkdone
26         if(! isipdevup $netdev) {
27                 startether=notdone
28                 export startether
29         }
30 }