Opened 17 years ago

Closed 16 years ago

#2326 closed defect (fixed)

service reloading of dhcp stops dhcp server

Reported by: Arthur Demchenkov Owned by: dnicholson@…
Priority: normal Milestone: 6.3
Component: Bootscripts Version: SVN
Severity: normal Keywords:
Cc:

Description

Hello there!

Looks like dhcpd exits when receiving HUP...

root:~# /etc/rc.d/init.d/dhcp status
dhcpd is running with Process ID(s) 2851.
root:~# /etc/rc.d/init.d/dhcp reload
Reloading DHCP Server...                                               [  OK  ]
root:~# /etc/rc.d/init.d/dhcp status
/usr/sbin/dhcpd is not running but /var/run/dhcpd.pid exists.
root:~# /etc/rc.d/init.d/dhcp start
Starting DHCP Server...                                                [  OK  ]

Maybe it's better to make reload a synonim of restart?

Change History (5)

comment:1 by dnicholson@…, 17 years ago

Owner: changed from blfs-book@… to dnicholson@…
Status: newassigned

comment:2 by dnicholson@…, 17 years ago

I thought this was talking about the service script, but this is actually a bootscript called dhcp in init.d. Looking at the script, it's seriously broken. The preferred way is to use the network service script which doesn't offer a reload option.

So, the options are to repair the init.d bootscript or to remove it. The init script is sort of broken by design since it offers no way to configure it per interface. Plus, the "reload" option (sending SIGHUP to dhcpcd) actually kills the daemon by design.

I say just remove the bootscript. Anyone have a problem with that?

comment:3 by dnicholson@…, 17 years ago

Wow. Forgive the nonsense in the previous comment. I thought this was about dhcp_c_d. I'm guessing here that sending SIGHUP to dhcpd is killing it, but I haven't looked at it.

comment:4 by Randy McMurchy, 17 years ago

Milestone: 6.2.16.3

comment:5 by dnicholson@…, 16 years ago

Resolution: fixed
Status: assignedclosed

Well, this was easier than I thought. From dhcpd.8:

Note: We get a lot of complaints about this.   We realize that it would
be nice if one could send a SIGHUP to the server and have it reload the
database.   This is not technically impossible, but it would require  a
great  deal  of work, our resources are extremely limited, and they can
be better spent elsewhere.   So please don't complain about this on the
mailing list unless you're prepared to fund a project to implement this
feature, or prepared to do it yourself.

I checked Fedora anyway, and they return an error if someone tries to run the initscript with reload. This should be fixed in r7153.

Note: See TracTickets for help on using tickets.