Re: renaming /etc/hostname...

From: Barry Margolin (barry.margolin_at_level3.com)
Date: 10/24/03


Date: Fri, 24 Oct 2003 19:16:06 GMT

In article <bnbr4o$vr6rj$1@ID-41250.news.uni-berlin.de>,
Emil Petkov <emil.petkov@usa.net> wrote:
>I have to share this story. The problem has been solved but it took some
>hours and left our server dead for a night. I have read at several
>places that in order to disable IPv6 on a Solaris box you have to rename
>or remove the file /etc/hostname6.<interface>. Well yesterday night I
>have decided to rename it (working remotely from home) and I had the
>idea that a simple
>
># mv /etc/hostname6.eri0 /etc/hostname6.eri0.noipv6
>
>will do. After an attempt to reboot the box disappeared and never came
>back untill got to it physically. Well as it appears the startup scripts
>are written so that if there is a file beginning with 'hostname...' in
>/etc they parse it and even manage to panic (instead of giving some
>message and try to continue with what they've got right) if there is
>something wrong with the suffixes. I havent thought about it. May be
>there is some logic in this behavior. So you end up in single user mode
>with nothing decently mounted.

I'm not sure why it would panicked. The script expects the suffix to be
the name of the interface to configure. So with the above file, it tries
to do:

ifconfig eri0.noipv6 ...

or whatever the IPv6 equivalent of ifconfig is. If the suffix doesn't
correspond to a valid interface name, I would expect this to print an error
and then for the startup script to go on.

>At this point I was fed up enough so I didn't care to explore the
>problem in details (i.e. how do the names get parsed and where does it
>go wrong precisely). I got an idea about that from 'System
>Administration Guide, Volume 3, Managing IPv6' but I have to say that
>this was afterwards. It would be much better if it was explicitly stated
>there. It happens somewhere in the /etc/init.d/network script.
>
>Rant #%$#^%$#^*&%&^%$^%&$#%
>
>So if you ever need to rename an /etc/hostname... file in order to ger
>rid of it just put something in front, for example
>
># mv /etc/hostname6.<interface> /etc/disabled.hostname6.<interface>
>
>And, of course, don't leave any other files, starting with 'hostname...'
>in /etc/.

This has always seemed obvious to me. Any file names
/etc/hostname.<something> is an instruction to configure an interface named
<something>.

-- 
Barry Margolin, barry.margolin@level3.com
Level(3), Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.


Relevant Pages

  • Re: renaming /etc/hostname...
    ... Well as it appears the startup scripts ... The script expects the suffix to be ... > correspond to a valid interface name, I would expect this to print an error ... If I get in system maintenance mode I ...
    (comp.sys.sun.admin)
  • Dual-homed 2003 hosts
    ... A dual-homed 2003 machine registers both NIC ... addresses in its primary zone even when an interface- ... specific suffix is entered in the second interface. ...
    (microsoft.public.windows.server.dns)