Hi,
I have been playing with kickstarts for a while, however i never understood why when you have the line:
network --device eth0 --bootproto static --ip 192.168.1.8 --netmask 255.255.255.0 --gateway 192.168.1.254 --nameserver 192.168.1.252 --hostname host.mydomain.com
kickstart creates a /etc/hosts file as follows:
127.0.0.1 host.mydomain.com myhost localhost.localdomainlocalhost
why doesn't it do it correcty as:
127.0.0.1 localhost.localdomain localhost 192.168.1.8 host.mydomain.com host
i know you can create a script in the %post but i was wondering if there was a correct way of generating hosts file in the kickstart that i maybe missing?
Kashif Ali wrote:
Hi,
I have been playing with kickstarts for a while, however i never understood why when you have the line:
network --device eth0 --bootproto static --ip 192.168.1.8 --netmask 255.255.255.0 --gateway 192.168.1.254 --nameserver 192.168.1.252 --hostname host.mydomain.com
kickstart creates a /etc/hosts file as follows:
127.0.0.1 host.mydomain.com myhost localhost.localdomainlocalhost
why doesn't it do it correcty as:
127.0.0.1 localhost.localdomain localhost 192.168.1.8 host.mydomain.com host
I don't want either; I use DNS for all my LANs.
Its not about using DNS, its simply configuring the local host correctly with it's own host/FQDN.
DNS something which would be used for other hosts....
Kashif
On 21/11/06, John Summerfield debian@herakles.homelinux.org wrote:
Kashif Ali wrote:
Hi,
I have been playing with kickstarts for a while, however i never
understood
why when you have the line:
network --device eth0 --bootproto static --ip 192.168.1.8 --netmask 255.255.255.0 --gateway 192.168.1.254 --nameserver 192.168.1.252--hostname host.mydomain.com
kickstart creates a /etc/hosts file as follows:
127.0.0.1 host.mydomain.com myhost localhost.localdomainlocalhost
why doesn't it do it correcty as:
127.0.0.1 localhost.localdomain localhost 192.168.1.8 host.mydomain.com host
I don't want either; I use DNS for all my LANs.
--
Cheers John
-- spambait 1aaaaaaa@coco.merseine.nu Z1aaaaaaa@coco.merseine.nu Tourist pics http://portgeographe.environmentaldisasters.cds.merseine.nu/
Please do not reply off-list
Anaconda-devel-list mailing list Anaconda-devel-list@redhat.com https://www.redhat.com/mailman/listinfo/anaconda-devel-list
Please, don't reply off-list. it stuffs threading & filtering.
Kashif Ali wrote:
Its not about using DNS, its simply configuring the local host correctly with it's own host/FQDN.
The domain name doesn't really mean much outside of DNS, particularly when a device is mobile,
Manually managing IP addresses and domain names is risky business; likely you'll get it wrong & wonder why it doesn't work.
DNS something which would be used for other hosts....
Kashif
On 21/11/06, John Summerfield debian@herakles.homelinux.org wrote:
Kashif Ali wrote:
Hi,
I have been playing with kickstarts for a while, however i never
understood
why when you have the line:
network --device eth0 --bootproto static --ip 192.168.1.8 --netmask 255.255.255.0 --gateway 192.168.1.254 --nameserver
192.168.1.252--hostname
host.mydomain.com
kickstart creates a /etc/hosts file as follows:
127.0.0.1 host.mydomain.com myhost localhost.localdomainlocalhost
why doesn't it do it correcty as:
127.0.0.1 localhost.localdomain localhost 192.168.1.8 host.mydomain.com host
I don't want either; I use DNS for all my LANs.
--
Cheers John
-- spambait 1aaaaaaa@coco.merseine.nu Z1aaaaaaa@coco.merseine.nu Tourist pics http://portgeographe.environmentaldisasters.cds.merseine.nu/
Please do not reply off-list
Anaconda-devel-list mailing list Anaconda-devel-list@redhat.com https://www.redhat.com/mailman/listinfo/anaconda-devel-list
On Wednesday 22 November 2006 06:32, John Summerfield wrote:
Manually managing IP addresses and domain names is risky business; likely you'll get it wrong & wonder why it doesn't work.
Depending on remote services for your machine to identify its own hostname is risky too.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Kashif Ali wrote:
Its not about using DNS, its simply configuring the local host correctly with it's own host/FQDN.
But it is. Check out network.py in the anaconda source rpm. Look at the write method. Then think on all of these things: X uses networking; sendmail for root emails uses networking; many other applications use networking so localhost is required; now with hotplug an interface card is not always in the system; a bastion host may not have access to DNS; if your are on a reliable network but loose connectivity to DNS you still want the local host using network software to function properly; blah blah blah. As a last sanity check, the network.py file attempts to make sure it can resolve the host name that you typed in. If it cannot, then you get the localhost and hostname on the same line.
Back in the Red Hat 5.2 days and some time later only a 127.0.0.1 localhost entry was created as I recall. The computer would appear to "hang" as sendmail was trying to figure out networking things. The 127.0.0.1 localhost.localdomain localhost line solved many problems like this as I recall.
When you consider the range of possible states of the network and purposes of the hosts that are being configured on a network, what other code would you purpose to make sure that the /etc/resolve.conf and /etc/hosts file are configured in such a way that the host is not broken when it first boots? The current method is to place the host name on the 127.0.0.1 line, if the host name that you typed in cannot be resolved via DNS ip = self.lookupHostname() In my SOHO environments, I don't want to run DNS or ldap until I can have redundancy--virtualization won't be useful here. So a private IP range of numbers will not resolve with the ISPs DNS servers. Yet, I want to plug in the ISPs DNS servers so that I can use yum repositories during package selection. So the ip = self.lookupHostname() looks like a good compromise.
If anaconda was modified to accept, say, an /etc/hosts file as a validation table for text box entry fields, would that be a good alternate method of hostname validation? This table could be used in network.py as a way to add initial entries in the /etc/hosts file too. If the table was not available, then the normal lookupHostname() function would try to validate the name.
DNS something which would be used for other hosts....
Kashif
On 21/11/06, *John Summerfield* <debian@herakles.homelinux.org mailto:debian@herakles.homelinux.org> wrote:
Kashif Ali wrote: > Hi, > > I have been playing with kickstarts for a while, however i never understood > why when you have the line: > > network --device eth0 --bootproto static --ip 192.168.1.8 <http://192.168.1.8> --netmask > 255.255.255.0 <http://255.255.255.0> --gateway 192.168.1.254 <http://192.168.1.254> --nameserver 192.168.1.252 <http://192.168.1.252> --hostname > host.mydomain.com <http://host.mydomain.com> > > kickstart creates a /etc/hosts file as follows: > > > 127.0.0.1 <http://127.0.0.1> host.mydomain.com <http://host.mydomain.com> myhost > localhost.localdomainlocalhost > > why doesn't it do it correcty as: > > 127.0.0.1 <http://127.0.0.1> localhost.localdomain localhost > 192.168.1.8 <http://192.168.1.8> host.mydomain.com <http://host.mydomain.com> host I don't want either; I use DNS for all my LANs.
Still have to have it even if DNS is available.
Regards, Greg
anaconda-devel@lists.fedoraproject.org