Project

General

Profile

Actions

Bug #837

closed

dhcpleases still not starting at boot time

Added by Marcus Brown over 14 years ago. Updated about 14 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
08/22/2010
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.0
Affected Architecture:

Description

We have a problem with the order of operations in the rc.bootup script
with respect to getting the dhcpleases program started.

From my system log on NanoBSD snapshot from Aug 22.

Aug 22 23:09:43 dhcpleases: lease file nees to exist before starting dhcpleases
Aug 22 16:09:44 php: : The command '/usr/local/sbin/dhcpleases -l
/var/dhcpd/var/db/dhcpd.leases -d home -p /var/run/dnsmasq.pid -h
/var/etc/hosts' returned exit code '1', the output was 'lease file
nees to exist before starting dhcpleases: No such file or directory'

Aug 22 23:09:44 dnsmasq31344: started, version 2.55 cachesize 10000
Aug 22 23:09:44 dnsmasq31344: compile time options: no-IPv6
GNU-getopt no-DBus I18N DHCP TFTP

Aug 22 23:09:48 dhcpd: Internet Systems Consortium DHCP Server V3.0.7
Aug 22 23:09:48 dhcpd: Copyright 2004-2008 Internet Systems Consortium.
Aug 22 23:09:48 dhcpd: All rights reserved.
Aug 22 23:09:48 dhcpd: For info, please visit http://www.isc.org/sw/dhcp/

*
the rc.bootup file calls system_hosts_generate() (which calls the
dhcpleases program) at line 202 and 229 of the rc.bootup file

/* re-make hosts file after configuring interfaces */
system_hosts_generate();

but the DHCP service is started at line 338

/* start DHCP service */
services_dhcpd_configure();

So, the dhcpleases program always fails to start at bootup because the
dhcp.leases file doesn't exist yet. I don't want to mess with the
bootup procedure because I don't feel that I know the considerations
and consequences of the booting order of services.

I do know that at lease one user has requested that the DHCP service
be started earlier in the bootup process, and I think that's a good
idea too.

Is there a good reason it is called near the end of the boot process?

However, we do need to do something different to get the dhcpleases
program started. Maybe the simplest thing to do is break the
dhcpleases start code out of the system_hosts_generate() into it's own
function so it can be called in rc.bootup after dhcp is started. ???

Actions

Also available in: Atom PDF