Bug 625
Summary: | /etc/rc.d/init.d/dhcpd should be a %config file | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Aleksey Nogin <aleksey> |
Component: | dhcp | Assignee: | David Lawrence <dkl> |
Status: | CLOSED NOTABUG | QA Contact: | |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 5.2 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 1998-12-29 18:49:06 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Aleksey Nogin
1998-12-27 16:20:50 UTC
This file does not contain any user configurable options in it. All configuration information should be in the dhcpd files located in /etc and not in the /etc/rc.d/init.d/dhcpd startup script. - All /etc/rc.d/init.d/* scripts have user configurable options in them - chkconfig options. - Many people like to customize scripts and it is usually good to make scripts %config files - May be I am doing something wrong, but I had to add @@ -22,6 +22,7 @@ case "$1" in start) # Start daemons. + route add -host 255.255.255.255 eth0 echo -n "Starting dhcpd: " daemon /usr/sbin/dhcpd echo @@ -32,6 +33,7 @@ echo -n "Shutting down dhcpd: " killproc dhcpd echo + route del -host 255.255.255.255 rm -f /var/lock/subsys/dhcpd ;; restart) to make it work. May be there is a better way, but why should I spend my time looking for it? If the chkconfig numbers are incorrect then that is more a bug that a user configurable option. Also the line you add to route add -host 255.255.255.255 eth0 is mainly for problems concerning windows clients. This should be added to /etc/sysconfig/static-routes in the form of: eth0 net 255.255.255.255 netmask And then add to your /etc/hosts file: 255.255.255.255 all-ones This should solve the problem you were fixing without editing of the default init.d file. The chkconfig numbers are not just "correct" or "incorrect" since different people may want different things in different runlevels. Of course, you can just add/remove symlinks without modifying the init.d file, but I always modify it in case I disable the daemon at some point (chkconfig --del) and later decide that I want it back (chkconfig --add). Of course my adding routing entries into the /etc/rc.d/init.d/dhcpd is not the best solution (although I still like it better than yours since mine creates this stupid route entry only when you actually run dhcpd), but there is _nothing wrong_ with it. You would probably agree, when for some reason the script is not a %config file, than it should at least contain a comment telling (as in /etc/ppp/ip-up): 1) That the script should not be modified 2) What should be modified instead But I really think that any file that people may want to modify (even when modifying a file is not a best way to solve their problems) should be a %config file. After all, the worst thing that could happen because of unnecessary %config is that you would get an extra .rpmsave file after upgrade while missing %config where it should be may result in loosing some important modification after an upgrade. I believe that one of the biggest strengths of Linux is that nearly everything in Linux is customizable. I think RedHat should try to encourage customization, not prohibit it. You suggestion has been noted and relayed to a developer. We will consider it for future releases. |