Solaris's files in
There should be one file in init.d, run early, to perform the task of determining and setting the system's hostname. Any other startup script that wants to know they hostname should then run the hostname command to get it.
There are multiple scripts in init.d that all duplicate some variant of complicated logic saying, "If I started up with DHCP, then ask DHCP what my hostname is, or if I started up with BOOTP, then ask something else what my hostname is, or
The annoying thing is that complicated logic winds up asking DHCP what the DHCP server supplied for my hostname. That's a legacy assumption: DHCP is not providing my hostname; instead I'm telling DHCP what I'd like my hostname to be. (This is a relatively new innovation for Solaris and apparently not everyone with commit access to
Solaris culture shock today.