Add DNS search domain to context packages
|Assignee:||Javi Fontan||% Done:|
|Target version:||Release 4.4|
Right now the context packages add DNS servers but not search domain.
feature #2391: changed variable SEARCH to SEARCH_DOMAIN
SEARCH is too generic and could be mistanken with some other ot may be used
in the future for other things.
#1 Updated by Valentin Bud almost 7 years ago
- File search_dns_context.patch added
I have modified the context packages to set up search domains in /etc/resolv.conf.
I have chosen SEARCH as the name of the variable to store the search domains mainly to be
consistent with resolv.conf(5) parameters.
I now have a template with the CONTEXT as follows:
CONTEXT = [
I have inserted both SEARCH and ETH0_SEARCH to test the code I have written works.
Maybe you guys can create ETH0_SEARCH if NETWORK="YES" in CONTEXT like
you already do with the other ETH0_* variables.
Reading resolv.conf(5) I thought about also adding DOMAIN. This becomes tricky
when you have VMs with multiple Ethernet cards and each network has a DOMAIN. Which
domain would you choose then ETH0_DOMAIN, ETHX_DOMAIN?
But if you have only "stub" VMs with only one Ethernet card DOMAIN might come in handy.
How about HOSTNAME? How would it be better to set that?
The code has been tested to work on Debian 7.1.0 Wheezy. I think it should work
on all other Linux distributions too.
The patch is done with git format-patch master.
#3 Updated by Javi Fontan almost 7 years ago
Valentin, thanks for the patch. I've just uploaded it.
I'll check with my colleagues the feasibility of adding the search parameter automatically in the core. I also think it will be useful.
The hostname value will need to be changed in different places for debian and redhat. I'll take a look but I don't think this will be for release 4.4.
#5 Updated by Andrei Nistor almost 7 years ago
In CentOS/RHEL you can set the hostname in
NETWORKING=yes HOSTNAME=foo.bar.ner NISDOMAIN=bar.net
This will set the proper hostname and nis domain after a reboot, however to make the settings available without rebooting you have to set them using
# hostname foo.bar.net # hostname --nis bar.net
^^^ my way of suggesting to add the NIS domain aswell if we include the hostname