2011-03-30 13:53:33 +00:00
|
|
|
#!/bin/rc
|
|
|
|
|
|
|
|
# desc: activate ethernet card
|
|
|
|
# prereq: configether
|
|
|
|
|
|
|
|
switch($1) {
|
|
|
|
case checkready
|
|
|
|
if(isipdevup /net/ether0) {
|
|
|
|
startether=done
|
|
|
|
export startether
|
|
|
|
}
|
|
|
|
|
|
|
|
case go
|
|
|
|
if(isipdevup /net/ether0)
|
|
|
|
exit
|
|
|
|
|
|
|
|
log starting ethernet $ethermethod config
|
|
|
|
switch($ethermethod) {
|
|
|
|
case manual
|
|
|
|
ip/ipconfig -g $gwaddr ether /net/ether0 $ipaddr $ipmask >>[2]/srv/log
|
|
|
|
case dhcp
|
2012-03-29 16:23:21 +00:00
|
|
|
ip/ipconfig >>[2]/srv/log
|
2011-03-30 13:53:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
case checkdone
|
|
|
|
if(! isipdevup /net/ether0) {
|
|
|
|
startether=notdone
|
|
|
|
export startether
|
|
|
|
}
|
|
|
|
}
|