/etc/rc.d/init.d/dhcpd should be a %config file
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 daemons.
+ route add -host 255.255.255.255 eth0
echo -n "Starting dhcpd: "
@@ -32,6 +33,7 @@
echo -n "Shutting down dhcpd: "
+ route del -host 255.255.255.255
rm -f /var/lock/subsys/dhcpd
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:
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
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
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.