inst/ndbsetup: s/chekdone/checkdone/, simplify
This commit is contained in:
parent
8b87e14b39
commit
d6fa8c3175
1 changed files with 10 additions and 14 deletions
|
@ -3,20 +3,16 @@
|
||||||
# desc: setup network configuration
|
# desc: setup network configuration
|
||||||
# prereq: confignet copydist
|
# prereq: confignet copydist
|
||||||
|
|
||||||
|
etheraddr=`{cat /net/ether0/addr >[2]/dev/null}
|
||||||
|
|
||||||
switch($1){
|
switch($1){
|
||||||
case checkready chekdone
|
case checkready checkdone
|
||||||
if(! ~ $netisfrom ether || \
|
if(~ $#etheraddr 1 && ~ $netisfrom ether && ~ $ethermethod dhcp manual && \
|
||||||
grep -s `{cat /net/ether0/addr} /n/newfs/lib/ndb/local){
|
! grep -s $etheraddr /n/newfs/lib/ndb/local)
|
||||||
ndbsetup=done
|
|
||||||
export ndbsetup
|
|
||||||
exit
|
|
||||||
}
|
|
||||||
if(~ $netisfrom ether && test -w /n/newfs/lib/ndb/local && \
|
|
||||||
test -r /net/ether0/addr){
|
|
||||||
ndbsetup=ready
|
ndbsetup=ready
|
||||||
export ndbsetup
|
if not
|
||||||
exit
|
ndbsetup=done
|
||||||
}
|
export ndbsetup
|
||||||
|
|
||||||
case go
|
case go
|
||||||
echo
|
echo
|
||||||
|
@ -33,10 +29,10 @@ case go
|
||||||
echo
|
echo
|
||||||
switch($ethermethod){
|
switch($ethermethod){
|
||||||
case dhcp
|
case dhcp
|
||||||
echo 'sys='^$sysname 'ether='^`{cat /net/ether0/addr}
|
echo 'sys='^$sysname 'ether='^$etheraddr
|
||||||
|
|
||||||
case manual
|
case manual
|
||||||
echo 'sys='^$sysname 'ether='^`{cat /net/ether0/addr} \
|
echo 'sys='^$sysname 'ether='^$etheraddr \
|
||||||
'ip='^$ipaddr 'ipmask='^$ipmask 'ipgw='^$gwaddr
|
'ip='^$ipaddr 'ipmask='^$ipmask 'ipgw='^$gwaddr
|
||||||
}
|
}
|
||||||
echo
|
echo
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue