Patrick O'Sullivan wrote:
> Looks like that worked, thanks. I had "opensolaris" in the file due to
> a couple howtos I briefly looked at online that indicate your hostname
> should be in /etc/hostname.int
> 
> Example: http://blogs.sun.com/clayb/entry/sun_isms_for_opensolaris_2008
> 
> However, I realize these are not definitive sources for information,
> hence the problem.

I didn't see any /etc/hostname6.* in that posting, only /etc/hostname.*.

The _real_ answer here is that /etc/hostname.* and /etc/hostname6.*
files both need to contain things that will be usable as ifconfig(1M)
command line options.

One possible way to use it is to set up /etc/nsswitch.conf and
/etc/hosts so that your host name (or some variation on it) resolves to
a single IP address that you'd like to use, and then insert that name in
/etc/hostname.$IF.

It's almost like doing this at boot time:

        args=$(cat /etc/hostname.$IF)
        ifconfig $IF $args netmask + broadcast + up

I say "almost," because the truth is that if an /etc/hostname.* file has
two or more lines (intentionally or accidentally), then the automatic
"netmask + broadcast + up" is left off, because it's "assumed" that you
know what you're doing.  (The usual failure mode here is accidentally
leaving an interface down.)  So, it's a little more like:

     if [[ $(wc -l < /etc/hostname.$IF) -le 1 ]]; then
        args=$(cat /etc/hostname.$IF)
        ifconfig $IF $args netmask + broadcast + up
     else
        while args; do
                ifconfig $IF $args
        done < /etc/hostname.$IF
     fi

And that's basically all for IPv4.  With IPv6, things are vastly
simpler.  Unless you're into deep interface configuration hacking, the
/etc/hostname6.* files are typically just empty.  The autoconf bits do
the rest.

When you say "yes" to IPv6 configuration at installation time on an
older Solaris system, all it does is "touch" the /etc/hostname6.* file
into existence.

-- 
James Carlson         42.703N 71.076W         <carls...@workingcode.com>
_______________________________________________
networking-discuss mailing list
networking-discuss@opensolaris.org

Reply via email to