renaming /etc/hostname...

From: Emil Petkov (emil.petkov_at_usa.net)
Date: 10/24/03


Date: Fri, 24 Oct 2003 20:30:48 +0200

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.

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/.

Regards,
Emil Petkov