Bug 625 - /etc/rc.d/init.d/dhcpd should be a %config file
/etc/rc.d/init.d/dhcpd should be a %config file
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: dhcp (Show other bugs)
5.2
i386 Linux
low Severity low
: ---
: ---
Assigned To: David Lawrence
:
Depends On:
Blocks:
  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:
Environment:
Last Closed: 1998-12-29 13:49:06 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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)
        # 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?
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 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.
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
/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.
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.