diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2011-11-04 20:34:15 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-11-15 11:54:43 +0000 |
commit | 8ae8b41f9d448a35441fa92f657e5b9edbcf68b5 (patch) | |
tree | 00713adef5b742a600b580a639b7fb4c35d447ae /meta/recipes-connectivity | |
parent | fad496c759066d53bebf9b8cebc63e6478c91d19 (diff) | |
download | openembedded-core-8ae8b41f9d448a35441fa92f657e5b9edbcf68b5.tar.gz openembedded-core-8ae8b41f9d448a35441fa92f657e5b9edbcf68b5.tar.bz2 openembedded-core-8ae8b41f9d448a35441fa92f657e5b9edbcf68b5.tar.xz openembedded-core-8ae8b41f9d448a35441fa92f657e5b9edbcf68b5.zip |
dhcp: generate initial leases files for server
If not using the init script it fails as the leases are created by it.
When used with systemd, this fails without the leases thus this allows
it to work out of box.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Added commit meesage from Otavio's email
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-connectivity')
-rw-r--r-- | meta/recipes-connectivity/dhcp/dhcp.inc | 9 | ||||
-rw-r--r-- | meta/recipes-connectivity/dhcp/dhcp_4.2.0.bb | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/meta/recipes-connectivity/dhcp/dhcp.inc b/meta/recipes-connectivity/dhcp/dhcp.inc index 1cc529dd8..f9d80e783 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 8ed7d7612..2471d6104 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 \ |