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

Re: updating /etc/hosts on ifup...



On Thursday 28 February 2002 12:37 am, Kevin A. Burton wrote:
> OK..
>
> What originally drew me here was this bug:
>
> http://www.blackdown.org/cgi-bin/jdk/done?id=19;user=guest
>
> It seems to me that in
>
> /etc/network/if-up.d we should have a script which changes the hostname in
> /etc/hosts to the new IP address of that interface.
>
> So when you do an 'ifup eth0' you would then change the 'hostname' entry in
> /etc/hosts to the newly acquired IP.
>
> In some situations this is highly desirable.  For example if you have a
> laptop that is always on DHCP (like I do) you want your /etc/hosts always
> synched up.
>
> Now on big server boxen you don't really want this.  Ideally this would be
> an optional debian package.
>
> Any thoughts?
>
In the laptop scenario, wouldn't it be better to point the hostname at 
localhost (which will always be valid, ethernet or not) and let the 
nameservers on the LAN you're plugged into provide DNS for the IP the system 
has?



Reply to: