From Bugzilla Helper: User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.2-2 i686) Description of problem: dhcpd can take a number of command line options the most useful of which is the interface you want it to listen on. At present the only way to specify any options is to edit /etc/init.d/dhcpd which is not desirable. The patch included modifies /etc/init.d/dhcpd to source /etc/sysconfig/dhcpd and set command line arguments accordingly. Also included is a sample dhcpd sysconfig file. How reproducible: Always Steps to Reproduce: 1. Not applicable 2. 3. Additional info:
Created attachment 18710 [details] Patch to add sysconfig configuration to dhcpd startup
Bugzilla didn't let me add the second attachment which was supposed to be the example sysconfig file. Here it is (entries should be self explanatory): #PORT=67 #CFFILE=/etc/dhcpd.conf #LEASEFILE=/var/lib/dhcp/dhcpd.leases #QUIET=NO #INTERFACES='' INTERFACES='eth1'
Shouldn't the install of dhcp also include a dhcp.conf file in /etc or /etc/dhcp/? What happens if you upgrade does it keep the current? Wouldn't it also need to add the default as .rpmnew or .rpmsave but do it in one of the above directories or in a nice easy location instead of hunting it down and having to edit /etc/init.d/dhcpd to reflect that? I haven't used it myself but always asked where it is but could never find it.
Reporter: One way to add another attachment is to GO BACK to the bug page. Right above the comments field is the 'Attachments' menu.
It would be nice if, as part of the post install script, the RPM would touch the dhcpd.leases file, so that if there isn't one, it will be created. The documentation with the package does not indicate that you have to create the file, and if you are upgrading from an older version, the location changed. So you can go from a working dhcpd setup to a broken setup by doing an upgrade. The same /etc/dhcpd.conf file will work.
The dhcp-3.0-2 package in rawhide (and in fact earlier dhcp packages) allow you to specify DHCPDARGS=... in /etc/sysconfig/dhcpd, so you can pass as many args as you like without having to add support for them to the initscript. I think this meets your requirement.... There is no /etc/dhcp.conf by default because configuration is absolutely required for the daemon to be of any use.