NISDOMAIN is provided by DHCP, which is run when the network interface is brought up. Even though /etc/init.d/ypbind is run *after* the network interfaces are initialized, the variable YP_DOMAIN is already set. DHCPC sets up the file /etc/yp.conf with the NISDOMAIN name. Because this is a laptop, I need to set the YP_DOMAIN dynamically. /etc/conf.d/ypbind contains the following: YP_DOMAIN=`head -1 /etc/yp.conf | cut -f 2 -d\ ` Because this file is run before DHCPC, the value it reads from yp.conf is incorrect. Reproducible: Always Steps to Reproduce: 1.Boot 2. 3. Actual Results: ypbind fails to connect to an NIS server NIS services are disrupted, passwd, autofs, etc. Expected Results: ypbind uses the NISDOMAIN set by DHCP.
in ypbind-1.17.2-r1 and onward, the nisdomainname is set using /etc/init.d/domainname... the best solution for you is to just have 'ypdomainname' run in your net.ethX's postup() function.