* [PATCH] dhcp: Correct leases directory location
@ 2010-03-31 13:29 Martyn Welch
2010-03-31 14:01 ` Steve Sakoman
0 siblings, 1 reply; 4+ messages in thread
From: Martyn Welch @ 2010-03-31 13:29 UTC (permalink / raw)
To: openembedded-devel; +Cc: Koen Kooi, Steve Sakoman
The DHCP client currently expects to be able to create a leases file in
"/var/lib/dhcp" as configured in dhcp3.inc. Recipe is currently creating a
directory called "/var/lib/dhcp3", resulting in the following error:
can't create /var/lib/dhcp/dhclient.eth0.leases
Correct directory naming to resolve error.
Signed-off-by: Martyn Welch <martyn.welch@ge.com>
---
Steve: This seems to be directy reversing a change you made. The commit
message doesn't give me any idea of why you did it, can you remember?
recipes/dhcp/dhcp3.inc | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/recipes/dhcp/dhcp3.inc b/recipes/dhcp/dhcp3.inc
index f099003..5507f1c 100644
--- a/recipes/dhcp/dhcp3.inc
+++ b/recipes/dhcp/dhcp3.inc
@@ -45,7 +45,7 @@ do_install() {
install -m 0644 ${WORKDIR}/default-server ${D}${sysconfdir}/default/dhcp-server
install -m 0644 ${WORKDIR}/dhclient.conf ${D}${sysconfdir}/dhcp/dhclient.conf
install -m 0644 ${WORKDIR}/dhcpd.conf ${D}${sysconfdir}/dhcp/dhcpd.conf
- install -d ${D}/var/lib/dhcp3
+ install -d ${D}/var/lib/dhcp
}
PACKAGES += "dhcp-server dhcp-client dhcp-relay dhcp-omshell"
@@ -53,7 +53,7 @@ FILES_${PN} = ""
FILES_dhcp-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server ${sysconfdir}/default/dhcp-server ${sysconfdir}/dhcp/dhcpd.conf"
FILES_dhcp-relay = "${sbindir}/dhcrelay ${sysconfdir}/init.d/dhcp-relay ${sysconfdir}/default/dhcp-relay"
-FILES_dhcp-client = "${base_sbindir}/dhclient ${base_sbindir}/dhclient-script ${sysconfdir}/dhcp/dhclient.conf /var/lib/dhcp3"
+FILES_dhcp-client = "${base_sbindir}/dhclient ${base_sbindir}/dhclient-script ${sysconfdir}/dhcp/dhclient.conf /var/lib/dhcp"
FILES_dhcp-omshell = "${bindir}/omshell"
--
Martyn Welch (Principal Software Engineer) | Registered in England and
GE Intelligent Platforms | Wales (3828642) at 100
T +44(0)127322748 | Barbirolli Square, Manchester,
E martyn.welch@ge.com | M2 3AB VAT:GB 927559189
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] dhcp: Correct leases directory location
2010-03-31 13:29 [PATCH] dhcp: Correct leases directory location Martyn Welch
@ 2010-03-31 14:01 ` Steve Sakoman
2010-03-31 15:02 ` Marc Olzheim
0 siblings, 1 reply; 4+ messages in thread
From: Steve Sakoman @ 2010-03-31 14:01 UTC (permalink / raw)
To: openembedded-devel
On Wed, 2010-03-31 at 14:29 +0100, Martyn Welch wrote:
> The DHCP client currently expects to be able to create a leases file in
> "/var/lib/dhcp" as configured in dhcp3.inc. Recipe is currently creating a
> directory called "/var/lib/dhcp3", resulting in the following error:
>
> can't create /var/lib/dhcp/dhclient.eth0.leases
>
> Correct directory naming to resolve error.
>
> Signed-off-by: Martyn Welch <martyn.welch@ge.com>
>
> ---
>
> Steve: This seems to be directy reversing a change you made. The commit
> message doesn't give me any idea of why you did it, can you remember?
Interesting. I made the change because I was getting quite similar
errors, but for files being created in /var/lib/dhcp3!
I'm not sure what is different about our overall set ups, but perhaps
the proper fix is to create both directories.
Steve
> recipes/dhcp/dhcp3.inc | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/recipes/dhcp/dhcp3.inc b/recipes/dhcp/dhcp3.inc
> index f099003..5507f1c 100644
> --- a/recipes/dhcp/dhcp3.inc
> +++ b/recipes/dhcp/dhcp3.inc
> @@ -45,7 +45,7 @@ do_install() {
> install -m 0644 ${WORKDIR}/default-server ${D}${sysconfdir}/default/dhcp-server
> install -m 0644 ${WORKDIR}/dhclient.conf ${D}${sysconfdir}/dhcp/dhclient.conf
> install -m 0644 ${WORKDIR}/dhcpd.conf ${D}${sysconfdir}/dhcp/dhcpd.conf
> - install -d ${D}/var/lib/dhcp3
> + install -d ${D}/var/lib/dhcp
> }
>
> PACKAGES += "dhcp-server dhcp-client dhcp-relay dhcp-omshell"
> @@ -53,7 +53,7 @@ FILES_${PN} = ""
> FILES_dhcp-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server ${sysconfdir}/default/dhcp-server ${sysconfdir}/dhcp/dhcpd.conf"
> FILES_dhcp-relay = "${sbindir}/dhcrelay ${sysconfdir}/init.d/dhcp-relay ${sysconfdir}/default/dhcp-relay"
>
> -FILES_dhcp-client = "${base_sbindir}/dhclient ${base_sbindir}/dhclient-script ${sysconfdir}/dhcp/dhclient.conf /var/lib/dhcp3"
> +FILES_dhcp-client = "${base_sbindir}/dhclient ${base_sbindir}/dhclient-script ${sysconfdir}/dhcp/dhclient.conf /var/lib/dhcp"
>
> FILES_dhcp-omshell = "${bindir}/omshell"
>
>
>
> --
> Martyn Welch (Principal Software Engineer) | Registered in England and
> GE Intelligent Platforms | Wales (3828642) at 100
> T +44(0)127322748 | Barbirolli Square, Manchester,
> E martyn.welch@ge.com | M2 3AB VAT:GB 927559189
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] dhcp: Correct leases directory location
2010-03-31 14:01 ` Steve Sakoman
@ 2010-03-31 15:02 ` Marc Olzheim
2010-03-31 16:36 ` Martyn Welch
0 siblings, 1 reply; 4+ messages in thread
From: Marc Olzheim @ 2010-03-31 15:02 UTC (permalink / raw)
To: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 1341 bytes --]
On Wed, Mar 31, 2010 at 07:01:29AM -0700, Steve Sakoman wrote:
> On Wed, 2010-03-31 at 14:29 +0100, Martyn Welch wrote:
> > The DHCP client currently expects to be able to create a leases file in
> > "/var/lib/dhcp" as configured in dhcp3.inc. Recipe is currently creating a
> > directory called "/var/lib/dhcp3", resulting in the following error:
> >
> > can't create /var/lib/dhcp/dhclient.eth0.leases
> >
> > Correct directory naming to resolve error.
> >
> > Signed-off-by: Martyn Welch <martyn.welch@ge.com>
> >
> > ---
> >
> > Steve: This seems to be directy reversing a change you made. The commit
> > message doesn't give me any idea of why you did it, can you remember?
>
> Interesting. I made the change because I was getting quite similar
> errors, but for files being created in /var/lib/dhcp3!
>
> I'm not sure what is different about our overall set ups, but perhaps
> the proper fix is to create both directories.
>
> Steve
Hmm, note that recipes/dhcp/files/init-server uses /var/lib/dhcp as well.
dhclient from 3.1.2p1 uses /var/lib/dhcp by default. Maybe one of the
older versions used /var/lib/dhcp3 by default...
I did not spot this myself because dhclient is run from network-manager
on our system, which passes it command line arguments on where to put
the lease file.
Marc
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] dhcp: Correct leases directory location
2010-03-31 15:02 ` Marc Olzheim
@ 2010-03-31 16:36 ` Martyn Welch
0 siblings, 0 replies; 4+ messages in thread
From: Martyn Welch @ 2010-03-31 16:36 UTC (permalink / raw)
To: openembedded-devel
Marc Olzheim wrote:
> On Wed, Mar 31, 2010 at 07:01:29AM -0700, Steve Sakoman wrote:
>
>> On Wed, 2010-03-31 at 14:29 +0100, Martyn Welch wrote:
>>
>>> The DHCP client currently expects to be able to create a leases file in
>>> "/var/lib/dhcp" as configured in dhcp3.inc. Recipe is currently creating a
>>> directory called "/var/lib/dhcp3", resulting in the following error:
>>>
>>> can't create /var/lib/dhcp/dhclient.eth0.leases
>>>
>>> Correct directory naming to resolve error.
>>>
>>> Signed-off-by: Martyn Welch <martyn.welch@ge.com>
>>>
>>> ---
>>>
>>> Steve: This seems to be directy reversing a change you made. The commit
>>> message doesn't give me any idea of why you did it, can you remember?
>>>
>> Interesting. I made the change because I was getting quite similar
>> errors, but for files being created in /var/lib/dhcp3!
>>
>> I'm not sure what is different about our overall set ups, but perhaps
>> the proper fix is to create both directories.
>>
>> Steve
>>
>
> Hmm, note that recipes/dhcp/files/init-server uses /var/lib/dhcp as well.
>
> dhclient from 3.1.2p1 uses /var/lib/dhcp by default. Maybe one of the
> older versions used /var/lib/dhcp3 by default...
>
> I did not spot this myself because dhclient is run from network-manager
> on our system, which passes it command line arguments on where to put
> the lease file.
>
> Marc
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>
The contents of do_compile:
do_compile() {
make RANLIB=${RANLIB}
PREDEFINES='-D_PATH_DHCPD_DB=\"/var/lib/dhcp/dhcpd.leases\" \
-D_PATH_DHCLIENT_DB=\"/var/lib/dhcp/dhclient.leases\" \
-D_PATH_DHCLIENT_SCRIPT=\"/sbin/dhclient-script\" \
-D_PATH_DHCPD_CONF=\"/etc/dhcp/dhcpd.conf\" \
-D_PATH_DHCLIENT_CONF=\"/etc/dhcp/dhclient.conf\"'
}
Would suggest an explicit preference to using "var/lib/dhcp". May be
there is another argument that has been missed?
Martyn
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-03-31 16:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-31 13:29 [PATCH] dhcp: Correct leases directory location Martyn Welch
2010-03-31 14:01 ` Steve Sakoman
2010-03-31 15:02 ` Marc Olzheim
2010-03-31 16:36 ` Martyn Welch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox