| Submitter | Otavio Salvador |
|---|---|
| Date | Nov. 10, 2011, 9:37 p.m. |
| Message ID | <021aada776e7f9ee9711f2959d00f98035f53a06.1320961001.git.otavio@ossystems.com.br> |
| Download | mbox | patch |
| Permalink | /patch/14777/ |
| State | New |
| Headers | show |
Comments
Am Donnerstag, den 10.11.2011, 21:37 +0000 schrieb Otavio Salvador: What is the error message you are getting? > Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> > --- > meta/recipes-connectivity/dhcp/dhcp.inc | 9 ++++++++- > meta/recipes-connectivity/dhcp/dhcp_4.2.0.bb | 2 +- > 2 files changed, 9 insertions(+), 2 deletions(-) […] Thanks, Paul
On Thu, Nov 10, 2011 at 19:50, Paul Menzel <paulepanter@users.sourceforge.net> wrote: > Am Donnerstag, den 10.11.2011, 21:37 +0000 schrieb Otavio Salvador: > > What is the error message you are getting? > >> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> >> --- >> meta/recipes-connectivity/dhcp/dhcp.inc | 9 ++++++++- >> meta/recipes-connectivity/dhcp/dhcp_4.2.0.bb | 2 +- >> 2 files changed, 9 insertions(+), 2 deletions(-) > > […] if not using the init script it fails as the leases are created by it. I am using it using systemd and this fails without the leases thus this allows it to work out of box.
Patch
diff --git a/meta/recipes-connectivity/dhcp/dhcp.inc b/meta/recipes-connectivity/dhcp/dhcp.inc index 1cc529d..f9d80e7 100644 --- a/meta/recipes-connectivity/dhcp/dhcp.inc +++ b/meta/recipes-connectivity/dhcp/dhcp.inc @@ -51,13 +51,15 @@ do_install_append () { mv ${D}${sbindir}/dhclient ${D}${base_sbindir}/ fi install -m 0755 ${S}/client/scripts/linux ${D}${base_sbindir}/dhclient-script + + install -d ${D}${localstatedir}/lib/dhcp/ } PACKAGES += "dhcp-server dhcp-server-config dhcp-client dhcp-relay dhcp-omshell" FILES_${PN} = "" -FILES_dhcp-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server" +FILES_dhcp-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server ${localstatedir}/lib/dhcp/" RRECOMMENDS_dhcp-server = "dhcp-server-config" FILES_dhcp-server-config = "${sysconfdir}/default/dhcp-server ${sysconfdir}/dhcp/dhcpd.conf" @@ -68,3 +70,8 @@ FILES_dhcp-client = "${base_sbindir}/dhclient ${base_sbindir}/dhclient-script ${ RDEPENDS_dhcp-client = "bash" FILES_dhcp-omshell = "${bindir}/omshell" + +pkg_postinst_dhcp-server() { + touch $D/${localstatedir}/lib/dhcp/dhcpd.leases + touch $D/${localstatedir}/lib/dhcp/dhcpd6.leases +} diff --git a/meta/recipes-connectivity/dhcp/dhcp_4.2.0.bb b/meta/recipes-connectivity/dhcp/dhcp_4.2.0.bb index 8ed7d76..2471d61 100644 --- a/meta/recipes-connectivity/dhcp/dhcp_4.2.0.bb +++ b/meta/recipes-connectivity/dhcp/dhcp_4.2.0.bb @@ -1,6 +1,6 @@ require dhcp.inc -PR = "r3" +PR = "r4" SRC_URI += "file://fixincludes.patch \ file://dhcp-3.0.3-dhclient-dbus.patch;striplevel=0 \
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> --- meta/recipes-connectivity/dhcp/dhcp.inc | 9 ++++++++- meta/recipes-connectivity/dhcp/dhcp_4.2.0.bb | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-)