Subject: Re: Re-reading /etc/hosts or /etc/rc.conf
To: None <port-mac68k@netbsd.org>
From: Matthew Theobalds <mtheobalds@mac.com>
List: port-mac68k
Date: 04/10/2001 22:29:20
On Tuesday, April 10, 2001, at 07:26  pm, Matthew Theobalds wrote:

> On Tuesday, April 10, 2001, at 12:43  am, Cameron Kaiser wrote:
>
>>> If I want to make a change to either /etc/hosts or /etc/rc.conf after
>>> the system has booted, can I restart a process to make them be 
>>> re-read?
>>
>> AFAIK:
>>
>> /etc/hosts isn't cached -- changes you make there should be immediate.
>
> Yes, I just verified that myself. Thanks.
>
>> /etc/rc.conf changes demand a reboot, since it determines startup 
>> settings.
>
> This is annoying as I wish to change the domain associated with the 
> machine for email purposes, but was quite enjoying my uptime.
>
> Is there any other way around this?

Blimey, I really do seem to have caused a lot of bother with this one!

I probably should have been more specific:

Firstly I will state what I consider to be true.

- A network has a domainname let's say mine is oops.com
- Each machine has a hostname, in my case gellum
- To the rest of the universe, that machine (assuming everything else is 
right) should be found at gellum.oops.com

If that is correct, we can continue.

In /etc/rc.conf, basic parameters are set which are read by other 
programs at boot-up. All of these can be changed, let's say using the 
commands domainname and hostname as root.

Setting the domainname to oops.com and the hostname to gellum should 
ensure that email sent -out- from that machine appears to come from 
user@gellum.oops.com

Would this be a foolish assumption?

However, in each case, the email has come back saying that it has merely 
come from user@gellum If, however, I changed the hostname to 
gellum.oops.com makes it works, and the email indeed appears to come 
from user@gellum.oops.com

This isn't a major problem as such (although it ruins the info posted on 
logging in) but isn't that wrong? Or have I missed something else?

Sorry for not being clearer. Now we know what I'm trying to do, perhaps 
it will be easier to answer.

Thanks for all the response so far, by the way, it has definitely helped 
on my all-round BSD knowledge, if not in this problem, precisely.

All the best, and thanks again.

Matthew