Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 144939 - Setting NIS domain causes /etc/yp.conf to be overwritten
Summary: Setting NIS domain causes /etc/yp.conf to be overwritten
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-23 23:41 UTC by Clint Dilks
Modified: 2006-08-27 18:30 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 Clint Dilks 2006-08-23 23:41:25 UTC
I have the following /etc/conf.d/net file

modules=( "dhcpcd" )

config_eth0=( "dhcp" )
dhcpcd_eth0="-t 90" # Timeout after 90 seconds
dhcp_eth0="release nodns nontp nonis" # Only get an address


nis_domain="our nis domain here"

Regardless of the setting for dhcp_eth0 /etc/yp.conf is overwritten.  I have also tried passing -Y to dhcpcd_eth0 no change.

If I comment out nis_domain="our nis domain here" /etc/yp.conf does not get overwritten but of course all ypbind and dependant services fail.
Comment 1 SpanKY gentoo-dev 2006-08-24 20:31:45 UTC
define "overwritten"

if you specify nis_domain, then your yp.conf will be clobbered automatically with a file that declares the domain you asked for
Comment 2 Clint Dilks 2006-08-24 21:43:26 UTC
By passing -Y to dhcpcd or passing the DHCP option nonis option the file /etc/yp.conf should not be modified.  This is similar to the way that you can specify that /etc/resolv.conf should not be updated.
Comment 3 SpanKY gentoo-dev 2006-08-24 22:47:14 UTC
yp.conf isnt being modified by dhcp, it's being modified by the net-scripts

the net-scripts are modifying the file because you told it to do so when you set the nis_domain variable
Comment 4 Clint Dilks 2006-08-27 15:21:47 UTC
Ok, but before the base layout change when NISDOMAIN  was set in  /etc/conf.d/domainname and then controlled by /etc/init.d/domainname it was possible to have a static yp.conf file.  As far as I am aware I must set NISDOMAIN to get ypbind running so is the situation I want no longer possible ?

Thank you
Comment 5 Clint Dilks 2006-08-27 18:30:59 UTC
This issue is now resolved.  For those who may mis-understand the way that I did.  The solution is to not use net-scripts at all for NIS.  The NIS domain can be set using hostname -y <your domain> once this is done asuming you have a correct yp.conf in place ypbind will start and work as expected.

Apologies to all for my mis-understanding, and thank-you to all those who attempted to assist me