Koozali.org: home of the SME Server

How to update 'hosts'

Darrell

How to update 'hosts'
« on: November 12, 2000, 08:38:00 PM »
I need to update the 'hosts' file.  What is the correct way under e-smith to do this?  I visited /etc/hosts and of course viewed the info about this must be updated via the e-smith templates...

Also, I thought the e-smith-named-conf-0.1-5.noarch.rpm would solve this problem for me however after a successful installation I found this RPM supports host names with letters and numbers only.  I need to enter the host name cr54230-a which the RPM did not accept.

For now I did update the /etc/hosts file with the cr54230-a entry to get what I needed working but I would like to put the entry in the correct place if someone can tell me where that is :-)

Gordon Rowell

RE: How to update 'hosts'
« Reply #1 on: November 13, 2000, 12:37:33 AM »
Darrell wrote:

> I need to update the 'hosts' file.  What is the correct way
> under e-smith to do this?  I visited /etc/hosts and of course
> viewed the info about this must be updated via the e-smith
> templates...

Correct. DNS/named is a better place to put these entries, but see
below for more detail.

mkdir -p /etc/e-smith/templates-custom/etc
cp -rp /etc/e-smith/templates/etc/hosts\
/etc/e-smith/templates-custom/etc

Now add your custom entries to the templates-custom version

/sbin/e-smith/expand-template /etc/hosts

> Also, I thought the e-smith-named-conf-0.1-5.noarch.rpm would
> solve this problem for me however after a successful
> installation I found this RPM supports host names with letters
> and numbers only.  I need to enter the host name cr54230-a
> which the RPM did not accept.

I have written new modules which do all of the host management.
They take the ideas of e-smith-named-conf and quite a lot of
others.

They will be available this week. However, they will not install
directly on top of e-smith 4.0 If you are interested in using them,
I suggest you join the devinfo mailing list as they will be announced
and discussed there.

> For now I did update the /etc/hosts file with the cr54230-a
> entry to get what I needed working but I would like to put the
> entry in the correct place if someone can tell me where that is
> :-)

See above - for now I suggest you copy the standard template and
your entries. The new e-smith-hosts module will do just what
you want, but (for various reasons) is not directly installable on
e-smith 4.0

Gordon

Darrell

RE: How to update 'hosts'
« Reply #2 on: November 13, 2000, 12:56:06 AM »
Done.  Thanks Gordon!