Bug 625 - /etc/rc.d/init.d/dhcpd should be a %config file
Summary: /etc/rc.d/init.d/dhcpd should be a %config file
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: dhcp
Version: 5.2
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: David Lawrence
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1998-12-27 16:20 UTC by Aleksey Nogin
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 1998-12-29 18:49:06 UTC

Attachments (Terms of Use)

Description Aleksey Nogin 1998-12-27 16:20:50 UTC
/etc/rc.d/init.d/dhcpd should be a %config file

Comment 1 David Lawrence 1998-12-28 17:43:59 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.

Comment 2 Aleksey Nogin 1998-12-28 17:52:59 UTC
- 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 23:47:59 UTC
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-29 01:42:59 UTC
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 18:49:59 UTC
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.