Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 625 - /etc/rc.d/init.d/dhcpd should be a %config file
/etc/rc.d/init.d/dhcpd should be a %config file
Product: Red Hat Linux
Classification: Retired
Component: dhcp (Show other bugs)
i386 Linux
low Severity low
: ---
: ---
Assigned To: David Lawrence
Depends On:
  Show dependency treegraph
Reported: 1998-12-27 11:20 EST by Aleksey Nogin
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 1998-12-29 13:49:06 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Aleksey Nogin 1998-12-27 11:20:50 EST
/etc/rc.d/init.d/dhcpd should be a %config file
Comment 1 David Lawrence 1998-12-28 12:43:59 EST
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.
Comment 2 Aleksey Nogin 1998-12-28 12:52:59 EST
- 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 eth0
        echo -n "Starting dhcpd: "
        daemon /usr/sbin/dhcpd
@@ -32,6 +33,7 @@
        echo -n "Shutting down dhcpd: "
        killproc dhcpd
+       route del -host
        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?
Comment 3 David Lawrence 1998-12-28 18:47:59 EST
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 eth0 is
mainly for problems concerning windows clients. This should be added
to /etc/sysconfig/static-routes in the form of:

eth0 net netmask

And then add to your /etc/hosts file: all-ones

This should solve the problem you were fixing without editing of the
default init.d file.
Comment 4 Aleksey Nogin 1998-12-28 20:42:59 EST
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
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.
Comment 5 David Lawrence 1998-12-29 13:49:59 EST
You suggestion has been noted and relayed to a developer. We will
consider it for future releases.

Note You need to log in before you can comment on or make changes to this bug.