addr=`{cat $ether/addr}
switch($addr){
case $addrs
- # try /lib/ndb first, then do dhcp
- ip/ipconfig -N ether $ether >[2]/dev/null \
- || ip/ipconfig -h $sysname ether $ether
+ # try /lib/ndb first, then do dhcp/slaac
+ ip/ipconfig -6 ether $ether
+ ip/ipconfig -N ether $ether >[2]/dev/null || @{
+ ip/ipconfig ether $ether ra6 recvra 1 &
+ ip/ipconfig -h $sysname ether $ether &
+ wait
+ }
}
}
}
echo 'Please choose a method for configuring your ethernet connection.'
echo
echo ' manual - specify IP address, network mask, gateway IP address'
- echo ' dhcp - use DHCP to automatically configure'
+ echo ' automatic - use DHCP and SLAAC to automatically configure'
echo
- prompt -d dhcp 'Configuration method' manual dhcp
+ prompt -d automatic 'Configuration method' manual automatic
ethermethod=$rd
gwaddr=xxx
ipaddr=xxx
export DNSSERVER
}
}
- export ethermethod gwaddr ipaddr ipmask dhcphost
+ export ethermethod gwaddr ipaddr ipmask
exec ./startether go
case checkdone
- if(! ~ $ethermethod manual dhcp) {
+ if(! ~ $ethermethod manual automatic) {
configether=notdone
export configether
}
switch($1){
case checkready checkdone
- if(~ $#etheraddr 1 && ~ $netisfrom ether && ~ $ethermethod dhcp manual && \
+ if(~ $#etheraddr 1 && ~ $netisfrom ether && ~ $ethermethod automatic manual && \
! grep -s $etheraddr /n/newfs/lib/ndb/local)
ndbsetup=ready
if not
echo
switch($ethermethod){
- case dhcp
+ case automatic
echo $se
case manual
echo $se 'ip='^$ipaddr 'ipmask='^$ipmask 'ipgw='^$gwaddr
exit
log starting ethernet $ethermethod config
+ ip/ipconfig -6
switch($ethermethod) {
case manual
ip/ipconfig -g $gwaddr ether $netdev $ipaddr $ipmask >>[2]/srv/log
- case dhcp
- ip/ipconfig >>[2]/srv/log
+ case automatic
+ >>[2]/srv/log @{
+ ip/ipconfig ra6 recva 1 &
+ ip/ipconfig &
+ wait
+ }
}
case checkdone
addr=`{cat $ether/addr}
switch($addr){
case $addrs
- # try /lib/ndb first, then do dhcp
- ip/ipconfig -N ether $ether >[2]/dev/null \
- || ip/ipconfig -h $sysname ether $ether
+ # try /lib/ndb first, then do dhcp/slaac
+ ip/ipconfig -6 ether $ether
+ ip/ipconfig -N ether $ether >[2]/dev/null || @{
+ ip/ipconfig ether $ether ra6 recvra 1 &
+ ip/ipconfig -h $sysname ether $ether &
+ wait
+ }
}
}
}
}
}
- must ip/ipconfig -p $*
+ if(~ $1 ether && ~ $#* 2) @{
+ ip/ipconfig -6 $*
+ ip/ipconfig $* ra6 recvra 1 &
+ ip/ipconfig -p $* &
+ wait
+ }
+ if not {
+ ip/ipconfig -p $*
+ }
+
if(~ $#fs 0)
fs=`{awk -F'=' '/^[ ]*fs=/{print $2}' /net/ndb}
if(~ $#auth 0)
}
}
- # set bootstrap authservers for factotum
- if(! ~ $#auth 0){
- grep -v '^[ ]*auth=' /net/ndb >/env/x
- cat /env/x <{echo ' auth='^$auth^'
-'} >/net/ndb
- rm /env/x
- }
+ # publish info in /net/ndb for factotum
+ >> /net/ndb {
+ echo
+ echo 'ipbootinfo='
+ for(i in $fs) echo ' fs='^$i
+ for(i in $auth) echo ' auth='^$i
+ }
}
fn connecttcp{