[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] kernel development



On Thu, Jun 24, 1999 at 12:46:59PM +0200, Julian Reschke wrote:
> > I noticed we have two similar files, /etc/host and /etc/hostname
> > whose usage remains unclear.  While /etc/hostname is used by the
> > 'hostname' command, the other file remains a mystery.

It (/etc/host) is neither read nor written by the MiNTLib.  I think it is
also ignored by MiNTNet altogether.  Remove it?

> > Anyhow, I noticed that HOSTNAME is evaluated by 'login' and the
> > shells, plus a lot of other things.  While one could purposely
> > define "export HOSTNAME=`hostname`" in their /etc/profile and
> > /etc/csh.cshrc (or in mint.cnf), why not have the kernel look
> > for /etc/hostname file and , if found, export the value as the
> > HOSTNAME string?
> 
> Because it's not up to the kernel to do something like this. Check out Unix
> systems -- they never go out, read config files and export environment
> variables.

Right, but the base for Martin's idea is ok to me.  Why not make
gethostname and sethostname kernel calls?  Sethostname should either be
called by /etc/rc.net or - which I think makes more sense with MiNT - in
mint.cnf. Whatever program sets the hostname could also update
/etc/hostname for compatibility with old software.

The file-system based solution is actually a work-around missing kernel
functionality, isn't it?  MiNTNet wouldn't need any changes in the sources
as long as it calls the libc "[gs]ethostname".

Ciao

Guido
-- 
http://stud.uni-sb.de/~gufl0000
mailto:gufl0000@stud.uni-sb.de