since the latest baselayout, we have /etc/init.d/hostname and /etc/init.d/domainname with its corresponding conf.d files. I think, it would be better to merge both init-scripts and configs into a single init-script and a single config. Since you always have to start both, it doesn't make sense to have seperate scripts. It's just confusing! Reproducible: Always Steps to Reproduce:
someone people dont want/need domainname
well, then one could disable the corresponding option in the config. But two init-scripts are bloated! DNSDOMAIN=""
so your solution to bloat is to add all of it into one much bigger, bloated file ? ;)
no, but most ppl will always need both. And the init-scripts are not so big. Combining them would be really a benefit. Even the ppl who don't need the domainname stuff gets that script installed, since it is in baselayout. So I don't see a problem in combining them.
if they were combined, what would you call the script ? 'hostname' and 'domainname' dont exactly describe a combined version
good question. :) SuSE has this stuff in /etc/init.d/boot.localnet
oh, well, I think '/etc/init.d/hostname' would be ok. Since you always have to start it and you always configure /etc/conf.d/hostname, you see the domain settings as well. And your fully qualified hostname is 'host.domain.tld', so everyone would look in 'hostname' to setup such things. My suggestion is (all things together): [/etc/conf.d/hostname] # Set to the hostname of this machine HOSTNAME="myhost" # When setting up resolv.conf, what should take precedence? # If you wish to always override DHCP/whatever, set this to 1. OVERRIDE=1 # To have a proper FQDN, you need to setup /etc/hosts and /etc/resolv.conf # properly (domain entry in /etc/resolv.conf, and FQDN in /etc/hosts). # Leave empty, or comment out, if you don't want to setup the domainname. # #DNSDOMAIN="mydomain.home" # This only set what /bin/hostname returns. If you need to setup NIS, meaning # what /bin/domainname returns, please see: # # http://www.linux-nis.org/nis-howto/HOWTO/ # #NISDOMAIN=""
btw: SuSE config for the host/domain stuff is just '/etc/HOSTNAME' which contains either 'host' or 'host.domain.tld'. So they do it also in one place. I don't know how other Distris handles this, but it looks strange to seperate things, which belongs together. But finally, it's your decision.
ok, this should be done in baselayout 1.12.x now
roy was so kind as to add support to the net scripts