4 # get primary default interface if not specified
7 if(! ~ $e '/net/ether*')
11 # setup wifi encryption if any
12 if(~ $1 ether && test -x /bin/aux/wpa){
13 essid=`{grep '^essid: ' $2/ifstats >[2]/dev/null | sed 's/^essid: //; q'}
15 if(! ~ $#wpapsk 0 || grep -s '^status: need authentication' $2/ifstats >[2]/dev/null){
16 x=(aux/wpa -s $"essid)
18 echo 'key proto=wpapsk' `{!password=$"wpapsk whatis essid !password} > /mnt/factotum/ctl
28 rm -f /env/^(essid wpapsk)
31 if(~ $1 ether gbe && ~ $#* 2) @{
33 test -e /env/nora6 || ip/ipconfig $* ra6 recvra 1 &
42 fs=`{awk -F'=' '/^[ ]*fs=/{print $2}' /net/ndb}
44 auth=`{awk -F'=' '/^[ ]*auth=/{print $2}' /net/ndb}
46 ask fs ' address is? ' $auth(1)
48 ask auth ' address is? ' $fs(1)
51 if(test -x /bin/ndb/dnsgetip){
52 for(i in fs auth secstore){
53 x=`{for(x in $$i) ndb/dnsgetip -a $x}
58 # publish info in /net/ndb for factotum
62 for(i in $fs) echo ' fs='^$i
63 for(i in $auth) echo ' auth='^$i
68 while(! ~ $#fs 0 && ! srv -q tcp!$fs(1)^!564 boot)
74 while(! ~ $#fs 0 && ! srvtls -q tcp!$fs(1)^!17020 boot)
80 while(! ~ $#fs 0 && ! srv -q il!$fs(1)^!17008 boot)
85 mtcp=(confignet connecttcp)
86 mtls=(confignet connecttls)
87 mil=(confignet connectil)
89 mt=(mtcp mtls mil $mt)