Description of problem: During DHCP testing, these problems with dhclient script were found and fixed: 1. Interface & resolv.conf configured and services restarted in wrong order Before, when a new lease is to be configured, dhclient-script potentially restarted the ntpd and ypbind services BEFORE the new interface and resolv.conf were configured, leading to long timeouts for these services . Now, dhclient-script will follow this order when a new lease is being configured: 1. (re-)Configure the interface and routes 2. configure resolv.conf 3. potentially restart ntpd and ypbind (It used to follow the REVERSE of this order). 2. Files that were reconfigured by DHCP when an new lease is configured (ifup) were not restored to previous versions when the lease is relinquished (ifdown). dhclient-script can potentially configure these files, /etc/resolv.conf /etc/yp.conf /etc/ntp.conf /etc/ntp/step-tickers It always has backed these up to ${FILE}.predhclient copies and then created the new ${FILE} when an new lease is configured (ifup); however, when the lease is relinquished (ifdown) it was not restoring these backup copies (it now does) . 3. NTP configuration : The default /etc/ntp.conf file as distributed with the ntp package was not preserved; dhclient-script used to write its own ntp.conf file containing ntp configuration statements that were out of date (eg. 'authenticate yes'), and removing server entries for local clocks. Now dhclient-script changes ONLY the server entries, removing any server entries EXCEPT THE LOCAL CLOCK, and adding new DHCP ntp server values, writing all server values to /etc/ntp/step-tickers . Both /etc/ntp.conf and /etc/ntp/step-tickers are backed up and the ntp server is restarted with the new files; the ntp.conf.predhclient and /etc/ntp/step-tickers.predhclient are restored and ntp restarted again when the lease is relinquished (ifdown). 4. NIS configuration: ypbind was not being told to reload /etc/yp.conf when a new /etc/yp.conf was written by dhclient, so changes made by dhclient to the yp configuration could never take effect unless the server is manually restarted. Now, when dhclient-script changes yp.conf, if ypbind is running after yp.conf is changed, dhclient-script sends ypbind a SIGHUP signal to reload yp.conf. If ypbind is not running, and ypbind is configured for the current runlevel, ypbind will be started up. If the yp.conf file becomes empty of any 'domain' or 'ypserver' entries, and ypbind gets a SIGHUP, it will shut itself down; so if the default yp.conf file before dhclient runs is empty, then ypbind will be automatically started when a lease is acquired, and shut down when the lease is relinquished. 5. A related problem (also related to bug #143704) was that during an ifdown, dhclient did not release the lease ; now that dhclient is fixed to properly shut down the dhclient run by ifup if invoked in -r mode, the /sbin/ifdown script will invoke dhclient -r to release the lease, so that the '*.predhclient' files will be restored when an 'ifdown' occurs . Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Fixed in: FC4: dhcp-3.0.2rc3-1+ FC3: dhcp-3.0.1-30_FC3+ + initscripts-8.0.3+