9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Newby Question on setting hostname
@ 2014-04-08  2:47 Daryl M
  2014-04-08  3:01 ` Lee Fallat
  0 siblings, 1 reply; 4+ messages in thread
From: Daryl M @ 2014-04-08  2:47 UTC (permalink / raw)
  To: 9fans

Greetings,

I spent time this weekend experimenting with, and learning about,
configuring my Plan9 machine as a simple,
DHCP client, terminal.  Networking now seems to work reliably: DNS is
resolving names, I can ping machines
locally and across the internet by both name and IP address.  I can also
connect to sources at bell labs and
browse them.  Timezone has been set and I even created another user though I
am not yet happy with the
results so have more to learn in that area.

Now, I want to set the machine's name.  From the Plan9 Wiki and searching
through the 9fans archives I now know:
          1) Editing /rc/bin/termrc to replace the default name, gnot, with
my machine's name is "not the right way".
          2) A post from earlier this year just said to edit /lib/ndb/local
and that there were plenty of examples.
	In reality, the only examples are for machines with static IP
addresses.
          3) A post from 2007 said to add an entry to /lib/ndb/local of the
form:
	  sys=<machinename>    ether=<MACaddress>
	Replacing <machinename> with the desired name of my machine and
replacing <MACaddress>
	with that machine's MAC address.  This works 	fine, but it could
get a bit unwieldy for configuring large
	numbers of machines.
          4) Another post said to just
	  echo -n <machinename> > /dev/sysname
	in /rc/bin/termrc.local.  I tested it and it also works fine and
seems to be the easiest.

My question is: What is the REAL preferred method for setting the machine
name?  #1, #3, #4, or something else?

Thank you,
Daryl M






^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] Newby Question on setting hostname
  2014-04-08  2:47 [9fans] Newby Question on setting hostname Daryl M
@ 2014-04-08  3:01 ` Lee Fallat
  2014-04-08  3:59   ` Ramakrishnan Muthukrishnan
  0 siblings, 1 reply; 4+ messages in thread
From: Lee Fallat @ 2014-04-08  3:01 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hey,

Put sysname=yourhostname in the plan9.ini file so you don't have to do
the echo every time. I was surprised it was not mentioned in the
plan9.ini (8) man page. I had to do a web search in order to find out
about it.

Enjoy,

Lee

On Mon, Apr 7, 2014 at 10:47 PM, Daryl M <glenda@mc2research.org> wrote:
> Greetings,
>
> I spent time this weekend experimenting with, and learning about,
> configuring my Plan9 machine as a simple,
> DHCP client, terminal.  Networking now seems to work reliably: DNS is
> resolving names, I can ping machines
> locally and across the internet by both name and IP address.  I can also
> connect to sources at bell labs and
> browse them.  Timezone has been set and I even created another user though I
> am not yet happy with the
> results so have more to learn in that area.
>
> Now, I want to set the machine's name.  From the Plan9 Wiki and searching
> through the 9fans archives I now know:
>           1) Editing /rc/bin/termrc to replace the default name, gnot, with
> my machine's name is "not the right way".
>           2) A post from earlier this year just said to edit /lib/ndb/local
> and that there were plenty of examples.
>         In reality, the only examples are for machines with static IP
> addresses.
>           3) A post from 2007 said to add an entry to /lib/ndb/local of the
> form:
>           sys=<machinename>    ether=<MACaddress>
>         Replacing <machinename> with the desired name of my machine and
> replacing <MACaddress>
>         with that machine's MAC address.  This works    fine, but it could
> get a bit unwieldy for configuring large
>         numbers of machines.
>           4) Another post said to just
>           echo -n <machinename> > /dev/sysname
>         in /rc/bin/termrc.local.  I tested it and it also works fine and
> seems to be the easiest.
>
> My question is: What is the REAL preferred method for setting the machine
> name?  #1, #3, #4, or something else?
>
> Thank you,
> Daryl M
>
>
>
>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] Newby Question on setting hostname
  2014-04-08  3:01 ` Lee Fallat
@ 2014-04-08  3:59   ` Ramakrishnan Muthukrishnan
  2014-04-08  4:05     ` erik quanstrom
  0 siblings, 1 reply; 4+ messages in thread
From: Ramakrishnan Muthukrishnan @ 2014-04-08  3:59 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Tue, Apr 8, 2014 at 8:31 AM, Lee Fallat <ircsurfer33@gmail.com> wrote:
>
> Put sysname=yourhostname in the plan9.ini file so you don't have to do

I did that on my 9atom system (9fat: to mount the fat file system on
/n/9fat and then edited plan9.ini) but that didn't have any effect. :(
It takes /dev/sysname (which is an IP address). I manually edited
/rc/bin/termrc to get a valid sysname.

--
  Ramakrishnan



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] Newby Question on setting hostname
  2014-04-08  3:59   ` Ramakrishnan Muthukrishnan
@ 2014-04-08  4:05     ` erik quanstrom
  0 siblings, 0 replies; 4+ messages in thread
From: erik quanstrom @ 2014-04-08  4:05 UTC (permalink / raw)
  To: 9fans

> I did that on my 9atom system (9fat: to mount the fat file system on
> /n/9fat and then edited plan9.ini) but that didn't have any effect. :(
> It takes /dev/sysname (which is an IP address). I manually edited
> /rc/bin/termrc to get a valid sysname.

ideally, put the following in one of /lib/ndb/local's database files (or local itself)

sys=<sys> ether=<ea> ip=<ip>

the system will figure it out.  ipconfig can set sysname if dhcp'd.

- erik



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-04-08  4:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-08  2:47 [9fans] Newby Question on setting hostname Daryl M
2014-04-08  3:01 ` Lee Fallat
2014-04-08  3:59   ` Ramakrishnan Muthukrishnan
2014-04-08  4:05     ` erik quanstrom

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).