* [9fans] Namespace customization
@ 2014-04-23 12:51 Carlos Sánchez de La Lama
2014-04-23 13:17 ` Carlos Sánchez de La Lama
0 siblings, 1 reply; 4+ messages in thread
From: Carlos Sánchez de La Lama @ 2014-04-23 12:51 UTC (permalink / raw)
To: 9fans
Hi all,
I am trying to put some customizations to the default namespace on a cpu
server with 2 nics. But I am having some problems:
If i put
bind -a #l1 /net.alt
bind -a #I1 /net.alt
on /lib/namespace, it works ok. But if I put the same two lines in
/cfg/$sysname/namespace (which gets executed at the end of
/lib/namespace) it does not.
In the latter case, those two get bound if I manually re-run /386/init
at the console of the cpu server after boot.
After googling and checking a bit, I see $sysname is set in cpurc, so I
will not be available at namespace creation.
Is there a way to have $sysname available at that point? Otherwise, the
lines using $sysname in stock /lib/namespace should be removed (they
lead to confusion). Any other way to customize namespace per-machine?
BR
Carlos
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9fans] Namespace customization
2014-04-23 12:51 [9fans] Namespace customization Carlos Sánchez de La Lama
@ 2014-04-23 13:17 ` Carlos Sánchez de La Lama
2014-04-23 21:26 ` Nick Owens
0 siblings, 1 reply; 4+ messages in thread
From: Carlos Sánchez de La Lama @ 2014-04-23 13:17 UTC (permalink / raw)
To: 9fans
I found the answer just after posting :S
> Is there a way to have $sysname available at that point?
Setting sysname in plan9.ini (or in this case in pxe/<macaddr> as I am
netbooting) does the trick :)
Carlos
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9fans] Namespace customization
2014-04-23 13:17 ` Carlos Sánchez de La Lama
@ 2014-04-23 21:26 ` Nick Owens
2014-04-25 6:47 ` Carlos Sánchez de La Lama
0 siblings, 1 reply; 4+ messages in thread
From: Nick Owens @ 2014-04-23 21:26 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
[-- Attachment #1: Type: text/plain, Size: 1089 bytes --]
in my cpu server in a vm, i put the nic setup in /cfg/$sysname/cpustart
and put the namespace setup in /lib/namespace.$sysname.
/cfg/chi/cpustart:
#!/bin/rc
#
# cpustart
## internal services
auth/secstored
ip/dhcpd
ip/tftpd
## external network (qemu nat)
bind -a '#l1' /net.alt
bind -a '#I1' /net.alt
ip/ipconfig -x /net.alt ether /net.alt/ether1
ndb/cs -x /net.alt
ndb/dns -Rrx /net.alt
aux/listen -q -t /rc/bin/service.auth -d /rc/bin/service /net.alt/tcp
and then /lib/namespace.chi:
bind -b '#l1' /net.alt
bind -b '#I1' /net.alt
mount -a /srv/cs_net.alt /net.alt
mount -a /srv/dns_net.alt /net.alt
from there i just import /net.alt from a second pxe booted machine if i
want to access the real 'net.
i hope this helps.
On Wed, Apr 23, 2014 at 01:17:59PM +0000, Carlos Sánchez de La Lama wrote:
> I found the answer just after posting :S
>
> > Is there a way to have $sysname available at that point?
>
> Setting sysname in plan9.ini (or in this case in pxe/<macaddr> as I am
> netbooting) does the trick :)
>
> Carlos
>
>
[-- Attachment #2: Type: application/pgp-signature, Size: 851 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9fans] Namespace customization
2014-04-23 21:26 ` Nick Owens
@ 2014-04-25 6:47 ` Carlos Sánchez de La Lama
0 siblings, 0 replies; 4+ messages in thread
From: Carlos Sánchez de La Lama @ 2014-04-25 6:47 UTC (permalink / raw)
To: 9fans
Hi Nick,
> in my cpu server in a vm, i put the nic setup in /cfg/$sysname/cpustart
> and put the namespace setup in /lib/namespace.$sysname.
That is quite similar to what I was trying to do (almost exactly the
same, thought I was putting namespace setup in /cfg/$sysname/namespace;
both that and /lib/namespace.$sysname are included from global
/lib/namespace).
My problem was that /env/sysname was not available at that point, but it
is solved now by adding sysname=<host> in plan9.ini
Thanks for your answer!
Carlos
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-04-25 6:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-23 12:51 [9fans] Namespace customization Carlos Sánchez de La Lama
2014-04-23 13:17 ` Carlos Sánchez de La Lama
2014-04-23 21:26 ` Nick Owens
2014-04-25 6:47 ` Carlos Sánchez de La Lama
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).