Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 76303 - merging /etc/init.d/hostname and /etc/init.d/domainname
Summary: merging /etc/init.d/hostname and /etc/init.d/domainname
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-01 07:11 UTC by Stefan Briesenick (RETIRED)
Modified: 2005-12-25 22:12 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Briesenick (RETIRED) gentoo-dev 2005-01-01 07:11:03 UTC
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:
Comment 1 SpanKY gentoo-dev 2005-01-01 13:00:39 UTC
someone people dont want/need domainname
Comment 2 Stefan Briesenick (RETIRED) gentoo-dev 2005-01-01 13:44:04 UTC
well, then one could disable the corresponding option in the config. But two init-scripts are bloated!

DNSDOMAIN=""
Comment 3 SpanKY gentoo-dev 2005-01-01 13:48:51 UTC
so your solution to bloat is to add all of it into one much bigger, bloated file ? ;)
Comment 4 Stefan Briesenick (RETIRED) gentoo-dev 2005-01-01 14:12:23 UTC
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.
Comment 5 SpanKY gentoo-dev 2005-01-01 14:34:14 UTC
if they were combined, what would you call the script ?

'hostname' and 'domainname' dont exactly describe a combined version
Comment 6 Stefan Briesenick (RETIRED) gentoo-dev 2005-01-01 15:19:23 UTC
good question. :)

SuSE has this stuff in /etc/init.d/boot.localnet
Comment 7 Stefan Briesenick (RETIRED) gentoo-dev 2005-01-01 15:25:47 UTC
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=""
Comment 8 Stefan Briesenick (RETIRED) gentoo-dev 2005-01-01 15:31:23 UTC
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.
Comment 9 SpanKY gentoo-dev 2005-12-25 22:11:57 UTC
ok, this should be done in baselayout 1.12.x now
Comment 10 SpanKY gentoo-dev 2005-12-25 22:12:11 UTC
roy was so kind as to add support to the net scripts