inst/configether: in manual network configuration, ask for dns server
This commit is contained in:
parent
295c0071c3
commit
20ba8815bc
2 changed files with 11 additions and 4 deletions
|
@ -21,6 +21,10 @@ case go
|
||||||
prompt 'network mask'; ipmask=$rd
|
prompt 'network mask'; ipmask=$rd
|
||||||
prompt 'gateway address'; gwaddr=$rd
|
prompt 'gateway address'; gwaddr=$rd
|
||||||
export ipaddr ipmask gwaddr
|
export ipaddr ipmask gwaddr
|
||||||
|
if(~ $#DNSSERVER 0){
|
||||||
|
prompt -d $gwaddr 'dns server'; DNSSERVER=$rd
|
||||||
|
export DNSSERVER
|
||||||
|
}
|
||||||
}
|
}
|
||||||
export ethermethod gwaddr ipaddr ipmask dhcphost
|
export ethermethod gwaddr ipaddr ipmask dhcphost
|
||||||
exec ./startether go
|
exec ./startether go
|
||||||
|
|
|
@ -28,15 +28,18 @@ case go
|
||||||
cp /n/newfs/lib/ndb/local /tmp/ndb.local
|
cp /n/newfs/lib/ndb/local /tmp/ndb.local
|
||||||
{
|
{
|
||||||
ssam 'x/^.*ether='^$etheraddr^'.*$/ d' /tmp/ndb.local
|
ssam 'x/^.*ether='^$etheraddr^'.*$/ d' /tmp/ndb.local
|
||||||
|
|
||||||
|
se = ('sys='^$sysname 'ether='^$etheraddr)
|
||||||
|
|
||||||
echo
|
echo
|
||||||
switch($ethermethod){
|
switch($ethermethod){
|
||||||
case dhcp
|
case dhcp
|
||||||
echo 'sys='^$sysname 'ether='^$etheraddr
|
echo $se
|
||||||
|
|
||||||
case manual
|
case manual
|
||||||
echo 'sys='^$sysname 'ether='^$etheraddr \
|
echo $se 'ip='^$ipaddr 'ipmask='^$ipmask 'ipgw='^$gwaddr
|
||||||
'ip='^$ipaddr 'ipmask='^$ipmask 'ipgw='^$gwaddr
|
if(! ~ $#DNSSERVER 0){
|
||||||
|
echo ' ' 'dns='^$DNSSERVER
|
||||||
|
}
|
||||||
}
|
}
|
||||||
echo
|
echo
|
||||||
} >/n/newfs/lib/ndb/local
|
} >/n/newfs/lib/ndb/local
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue