Re: [9fans] [9pi] standardize \ normalize setting dns in

2013-04-04 Thread c117152
On Wednesday, April 3, 2013 1:51:25 PM UTC+3, Richard Miller wrote:
 Go ahead.  It's called termrc.'local' because it's your own local
 
 configuration to play with as you like.  There's no standard.  The
 
 one on sources is an empty template, and the one on the raspberry pi
 
 image is just an initial suggestion.

Oh, I see. I'm just used to trying to separate code from data so much I thought 
a default that keeps the users from editing scripts is the norm and would get 
upstreamed. In practice my concern was that I'll replica\pull over it by 
mistake... I suppose you can tell I'm a linux user :P

On Wednesday, April 3, 2013 1:54:45 PM UTC+3, Bence Fábián wrote:
 what does ndb/query sys $sysname say?
 
 try to add ether and dom like this:
 
 
 ip=10.0.0.13 sys=9pi ether=x... dom=9pi.Home
 

Ops. Good call. It returned the ip as the sysname. :)
All better now. Here's some breadcrumbs for any brave adventurers lucky enough 
to google this discussion:

term% cat /lib/ndb/local

#
#  files comprising the database, use as many as you like, see ndb(6)
#
database=
file=/lib/ndb/local
file=/lib/ndb/common

auth=sources.cs.bell-labs.com authdom=outside.plan9.bell-labs.com

#
#  because the public demands the name localsource
#
ip=127.0.0.1 sys=localhost dom=localhost

ipnet=HOME
ip=10.0.0.0
ipmask=255.255.255.0
ipsubmask=255.255.255.0
ipgw=10.0.0.138
auth=9pi
cpu=9pi
fs=9pi
dns=1.2.3.4
dns=8.8.8.8
dns=8.8.4.4
dns=10.0.0.138
dnsdomain=HOME

ip=10.0.0.13 sys=9pi dom=9pi.HOME proto=il

auth=10.0.0.13 authdom=9pi.HOME

term% ndb/query sys $sysname
ip=10.0.0.13 sys=9pi dom=9pi.HOME proto=il 

Thanks !



Re: [9fans] [9pi] standardize \ normalize setting dns in

2013-04-04 Thread Bence Fábián
2013/4/4 c117...@rmqkr.net

 term% cat /lib/ndb/local

 #
 #  files comprising the database, use as many as you like, see ndb(6)
 #
 database=
 file=/lib/ndb/local
 file=/lib/ndb/common

 auth=sources.cs.bell-labs.com authdom=outside.plan9.bell-labs.com

 #
 #  because the public demands the name localsource
 #
 ip=127.0.0.1 sys=localhost dom=localhost

 ipnet=HOME
 ip=10.0.0.0
 ipmask=255.255.255.0
 ipsubmask=255.255.255.0
 ipgw=10.0.0.138
 auth=9pi
 cpu=9pi
 fs=9pi
 dns=1.2.3.4
 dns=8.8.8.8
 dns=8.8.4.4
 dns=10.0.0.138
 dnsdomain=HOME

 ip=10.0.0.13 sys=9pi dom=9pi.HOME proto=il

 auth=10.0.0.13 authdom=9pi.HOME

 term% ndb/query sys $sysname
 ip=10.0.0.13 sys=9pi dom=9pi.HOME proto=il

 Thanks !


Suppose you have

ip=10.0.0.13 sys=9pi1 dom=9pi.HOME proto=il

ip=10.0.0.14 sys=9pi4 dom=9pi.HOME proto=il

which one is this machine?
add the 'ether='

excerpt from my /lib/ndb/local:

ipnet=9front ip=10.0.2.0 ipmask=255.255.255.0
ipgw=10.0.2.2
dns=10.150.128.15

sys=thor ether=525400123456 dom=thor.9front
ip=10.0.2.15


and the output on my qemu terminal looks like this:

term% ndb/query sys $sysname
ip=10.0.2.15 ipmask=/120 ipgw=10.0.2.2 sys=thor dns=10.150.128.15
sys=thor ether=525400123456 dom=thor.9front ip=10.0.2.15
term%


Re: [9fans] [9pi] standardize \ normalize setting dns in

2013-04-04 Thread Richard Miller
 my concern was that I'll replica\pull over it by mistake

pull will not update anything you have locally modified, unless
you explicitly tell it to with a '-s file-or-directory-name' parameter.
You get an error message instead.




Re: [9fans] [9pi] standardize \ normalize setting dns in

2013-04-04 Thread erik quanstrom
 ipnet=9front ip=10.0.2.0 ipmask=255.255.255.0
 ipgw=10.0.2.2
 dns=10.150.128.15
 
 

5: r
!/bin/upas/marshal -s 'Re: [9fans] [9pi] standardize \ normalize setting dns 
in' -R /mail/fs/mbox/1698 9fans@9fans.net
 sys=thor ether=525400123456 dom=thor.9front
 ip=10.0.2.15
 
 
 and the output on my qemu terminal looks like this:
 
 term% ndb/query sys $sysname
 ip=10.0.2.15 ipmask=/120 ipgw=10.0.2.2 sys=thor dns=10.150.128.15
 sys=thor ether=525400123456 dom=thor.9front ip=10.0.2.15
 term%

that doesn't look right.  using the ndb excerpt posed,
i get this

; ndb/query -f /tmp/test.ndb sys thor
sys=thor ether=525400123456 dom=thor.9front 

were some bits left out of your example?

- erik



Re: [9fans] [9pi] standardize \ normalize setting dns in

2013-04-04 Thread Bence Fábián
I tried with a dummy file and I get the same results as you.
My guess (haven't checked anything) that it gets the other
information from /net/ndb.

However I'm in no way an ndb expert. Maybe someone
knowledgable can weigh in on this.


2013/4/4 erik quanstrom quans...@quanstro.net

  ipnet=9front ip=10.0.2.0 ipmask=255.255.255.0
  ipgw=10.0.2.2
  dns=10.150.128.15
 
 

 5: r
 !/bin/upas/marshal -s 'Re: [9fans] [9pi] standardize \ normalize setting
 dns in' -R /mail/fs/mbox/1698 9fans@9fans.net
  sys=thor ether=525400123456 dom=thor.9front
  ip=10.0.2.15
 
 
  and the output on my qemu terminal looks like this:
 
  term% ndb/query sys $sysname
  ip=10.0.2.15 ipmask=/120 ipgw=10.0.2.2 sys=thor dns=10.150.128.15
  sys=thor ether=525400123456 dom=thor.9front ip=10.0.2.15
  term%

 that doesn't look right.  using the ndb excerpt posed,
 i get this

 ; ndb/query -f /tmp/test.ndb sys thor
 sys=thor ether=525400123456 dom=thor.9front

 were some bits left out of your example?

 - erik




Re: [9fans] [9pi] standardize \ normalize setting dns in

2013-04-03 Thread c117152
On Thursday, March 28, 2013 2:41:42 PM UTC+2, Richard Miller wrote:
 For a machine not receiving net configuration via DHCP, the normal
 
 place to define dns= would be in /lib/ndb/local - 'man 6 ndb' for
 
 information.

Yes. I've already figured out that much:

term% cat /lib/ndb/local

database=
file=/lib/ndb/local
file=/lib/ndb/common

auth=sources.cd.bell-labs.com authdom=outside.plan9.bell-labs.com

ip=127.0.0.1 sys=localhost dom=localhost

ipnet=Home ip=10.0.0.0 ipmask=255.255.255.0
ipgw=10.0.0.138
dns=1.2.3.4 # (my isp's dns)
dns=8.8.8.8 # (googleA)
dns=8.8.4.4 # (googleB)
dns=10.0.0.138 # (my router for when the net is down but I still want 
local quarries getting through and local dom - .Home - requests)
auth=9pi
cpu=9pi

ip=10.0.0.13 sys=9pi

The thing is, the way I understand and implement it, you have your basic 
networking split in at least two places: The /lib/ndb/local file and the 
ip/ipconfig command arguments (being called from termrc.local...). Now, if 
there's a DHCP then you can forgo /lib/ndb/local and just specify an empty 
ipconfig=. However, on a static ip you're only allowed to do everything 
except feeding it a dns.

My idea is to have a line or two added to termrc.local that will parse a single 
dns var from the cmdline.txt file. This way you can get the same convenience 
you'd get with DHCP in a static setup.

I'm not sure it's a possible needless un +\-foreseen complication, lack of 
interest, an oversight, a security concern or whatever... But it seems to me 
that it could simplify things a little.

Just a thought really ;)



Re: [9fans] [9pi] standardize \ normalize setting dns in

2013-04-03 Thread c117152
On Thursday, March 28, 2013 2:41:42 PM UTC+2, Richard Miller wrote:
 For a machine not receiving net configuration via DHCP, the normal
 
 place to define dns= would be in /lib/ndb/local - 'man 6 ndb' for
 
 information.

Yes. I've already figured out that much:

term% cat /lib/ndb/local

database=
file=/lib/ndb/local
file=/lib/ndb/common

auth=sources.cd.bell-labs.com authdom=outside.plan9.bell-labs.com

ip=127.0.0.1 sys=localhost dom=localhost

ipnet=Home ip=10.0.0.0 ipmask=255.255.255.0
ipgw=10.0.0.138
dns=1.2.3.4 # (my isp's dns)
dns=8.8.8.8 # (googleA)
dns=8.8.4.4 # (googleB)
dns=10.0.0.138 # (my router for when the net is down but I still want 
local quarries getting through and local dom - .Home - requests)
auth=9pi
cpu=9pi

ip=10.0.0.13 sys=9pi

The thing is, the way I understand and implement it, you have your basic 
networking split in at least two places: The /lib/ndb/local file and the 
ip/ipconfig command arguments (being called from termrc.local...). Now, if 
there's a DHCP then you can forgo /lib/ndb/local and just specify an empty 
ipconfig=. However, on a static ip you're only allowed to do everything 
except feeding it a dns.

My idea is to have a line or two added to termrc.local that will parse a single 
dns var from the cmdline.txt file. This way you can get the same convenience 
you'd get with DHCP in a static setup.

I'm not sure it's a possible needless un +\-foreseen complication, lack of 
interest, an oversight, a security concern or whatever... But it seems to me 
that it could simplify things a little.

Just a thought really.



Re: [9fans] [9pi] standardize \ normalize setting dns in

2013-04-03 Thread c117152
On Mar 28, 8:41 am, 9f...@hamnavoe.com (Richard Miller) wrote:
 For a machine not receiving net configuration via DHCP, the normal
 place to define dns= would be in /lib/ndb/local - 'man 6 ndb' for
 information.

Yes. I've already figured out that much:

term% cat /lib/ndb/local

database=
file=/lib/ndb/local
file=/lib/ndb/common

auth=sources.cd.bell-labs.com authdom=outside.plan9.bell-labs.com

ip=127.0.0.1 sys=localhost dom=localhost

ipnet=Home ip=10.0.0.0 ipmask=255.255.255.0
ipgw=10.0.0.138
dns=1.2.3.4 # (my isp's dns)
dns=8.8.8.8 # (googleA)
dns=8.8.4.4 # (googleB)
dns=10.0.0.138 # (my router for when the net is down but I still want
local quarries getting through and local dom - .Home - requests)
auth=9pi
cpu=9pi

ip=10.0.0.13 sys=9pi

The thing is, the way I understand and implement it, you have your
basic networking split in at least two places: The /lib/ndb/local file
and the ip/ipconfig command arguments (being called from
termrc.local...). Now, if there's a DHCP then you can forgo /lib/ndb/
local and just specify an empty ipconfig=. However, on a static ip
you're only allowed to do everything except feeding it a dns.

My idea is to have a line or two added to termrc.local that will parse
a single dns var from the cmdline.txt file. This way you can get the
same convenience you'd get with DHCP in a static setup.

I'm not sure it's a possible needless un +\-foreseen complication,
lack of interest, an oversight, a security concern or whatever... But
it seems to me that it could simplify things a little.

Just a thought really.

p.s. This is my third or fourth attempt at a reply. The first two were
on the new groups interface. This attempt is on the old one. hopefully
those aren't coming out somewhere as double\triple\quadruple posts...



Re: [9fans] [9pi] standardize \ normalize setting dns in

2013-04-03 Thread Richard Miller
 My idea is to have a line or two added to termrc.local that will parse
 a single dns var from the cmdline.txt file.

Go ahead.  It's called termrc.'local' because it's your own local
configuration to play with as you like.  There's no standard.  The
one on sources is an empty template, and the one on the raspberry pi
image is just an initial suggestion.




Re: [9fans] [9pi] standardize \ normalize setting dns in

2013-04-03 Thread Bence Fábián
what does ndb/query sys $sysname say?

try to add ether and dom like this:

ip=10.0.0.13 sys=9pi ether=x... dom=9pi.Home



2013/4/3 c117...@rmqkr.net

 On Mar 28, 8:41 am, 9f...@hamnavoe.com (Richard Miller) wrote:
  For a machine not receiving net configuration via DHCP, the normal
  place to define dns= would be in /lib/ndb/local - 'man 6 ndb' for
  information.

 Yes. I've already figured out that much:

 term% cat /lib/ndb/local

 database=
 file=/lib/ndb/local
 file=/lib/ndb/common

 auth=sources.cd.bell-labs.com authdom=outside.plan9.bell-labs.com

 ip=127.0.0.1 sys=localhost dom=localhost

 ipnet=Home ip=10.0.0.0 ipmask=255.255.255.0
 ipgw=10.0.0.138
 dns=1.2.3.4 # (my isp's dns)
 dns=8.8.8.8 # (googleA)
 dns=8.8.4.4 # (googleB)
 dns=10.0.0.138 # (my router for when the net is down but I still
 want
 local quarries getting through and local dom - .Home - requests)
 auth=9pi
 cpu=9pi

 ip=10.0.0.13 sys=9pi

 The thing is, the way I understand and implement it, you have your
 basic networking split in at least two places: The /lib/ndb/local file
 and the ip/ipconfig command arguments (being called from
 termrc.local...). Now, if there's a DHCP then you can forgo /lib/ndb/
 local and just specify an empty ipconfig=. However, on a static ip
 you're only allowed to do everything except feeding it a dns.

 My idea is to have a line or two added to termrc.local that will parse
 a single dns var from the cmdline.txt file. This way you can get the
 same convenience you'd get with DHCP in a static setup.

 I'm not sure it's a possible needless un +\-foreseen complication,
 lack of interest, an oversight, a security concern or whatever... But
 it seems to me that it could simplify things a little.

 Just a thought really.

 p.s. This is my third or fourth attempt at a reply. The first two were
 on the new groups interface. This attempt is on the old one. hopefully
 those aren't coming out somewhere as double\triple\quadruple posts...




[9fans] [9pi] standardize \ normalize setting dns in

2013-03-28 Thread c117152
In 9pi, the cmdline.txt allows defining an env var that is evaluated and used 
by /bin/termrc.local as line arguments for ip/ipconfig. e.g.

term% dossrv -f/dev/sdM0/dos
term% mount -c /srv/dos /mnt
term% cat /mnt/cmdline.txt
readparts=1 nobootprompt=local user=glenda ipconfig='-g 10.0.0.138 ether 
/net/ether0 10.0.0.13 255.255.255.0'
term%

This however is only sufficient in establishing an ip. For dns resolution it's 
necessary to add a dns ip to the ndb. e.g.

term% ehco 'dns=8.8.8.8'/net/ndb

What I'd like to ask is for termrc.local to have a dns option so something like 
dns='8.8.8.8 8.8.4.4' will add the entries properly.

R.K.

p.s. Manually adding ehco 'dns=8.8.8.8'/net/ndb works but I'd like a 
more official solution...



Re: [9fans] [9pi] standardize \ normalize setting dns in

2013-03-28 Thread Jacob Todd
Then why don't you add it to termrc.local? That's what it is for.


Re: [9fans] [9pi] standardize \ normalize setting dns in

2013-03-28 Thread Richard Miller
For a machine not receiving net configuration via DHCP, the normal
place to define dns= would be in /lib/ndb/local - 'man 6 ndb' for
information.