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 46942 - Startup and shutdown scripts for dhcpcd are wrong
Startup and shutdown scripts for dhcpcd are wrong
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
: 53670 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2001-07-02 08:12 EDT by Steven W. Orr
Modified: 2014-03-16 22:21 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-08-09 01:43:07 EDT
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 Steven W. Orr 2001-07-02 08:12:40 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.7 [en] (X11; I; SunOS 5.7 sun4u)

Description of problem:
dhcpcd is stopped when you do a network stop command. network calls ifdown
which kills dhcpcd by calling dhcpcd -k. The -k option sends dhcpcd a
SIGHUP which causes the lease on the IP address to be released. This is
wrong. Instead it should be sent a SIGTERM so that the cache info for the
lease is retained.

Also, the ifup script does not allow the user to specify additional options
to dhcpcd.

How reproducible:

Steps to Reproduce:
1.service network stop

Actual Results:  dhcpcd was killed with a SIGHUP instead of a SIGTERM.

Expected Results:  dhcpcd should have saved its information about its
current lease so that on next startup it would ask for its old lease.

Additional info:

A possible fix for ifdown:

 ifdown should *not* do a
                dhcpcd -k ${DEVICE}
   instead it should do a
                kill -15
   The associated fragment should look lsomething like this:
        dhcpcdPid=$(pidof -x dhcpcd)
        [ -n "${dhcpcdPid}" ] && {
                kill -15 ${dhcpcdPid}

ifup should look like this instead of what it currently does.
(The initial value for DHCPCDASRGS are my customizations.)

if [ -n "${DYNCONFIG}" ]; then
    DHCPCDARGS='-d -R' # My example additional flags.
    if [ -n "${DHCP_HOSTNAME}" ]; then
Comment 1 Michael Meissner 2001-07-12 22:45:31 EDT
One reason for having additional arguments to dhcpd is one I just ran into.  In
setting up my new fractional T1, I needed to install a Linux box as the router
and firewall.  Like the more popular cable modems and DSL setups, there is an
ethernet connection from the Wan and of course the local network.  You don't
want to run dhcpd on the external network, but you do want to run it on the
internal networks (in my case, I have two disjoint local networks, and the
firewall box has 3 ethernet cards).  You don't want to hack the Red Hat provided
script, since that won't survive any upgrades.
Comment 2 Bill Nottingham 2001-08-09 01:45:01 EDT
Fixed in 6.13-1 (both using kill -15, and also using any DHCPCDARGS/PUMPARGS in
the environment (so they can be set in the ifcfg files.)
Comment 3 Bill Nottingham 2005-01-06 17:46:06 EST
*** Bug 53670 has been marked as a duplicate of this bug. ***

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