summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/dhcp/dhcp.inc
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2011-11-04 20:34:15 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-11-15 12:05:26 (GMT)
commit022c3584034c45d1aecc55164faa9766ac67d03e (patch)
treeb37c1165d5baa72591dbc4f6f1e756ec49b10b98 /meta/recipes-connectivity/dhcp/dhcp.inc
parent6c508124a1aa7a963f7c5cc627ef31b51927132c (diff)
downloadpoky-022c3584034c45d1aecc55164faa9766ac67d03e.tar.gz
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. (From OE-Core rev: 8ae8b41f9d448a35441fa92f657e5b9edbcf68b5) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/dhcp/dhcp.inc')
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp.inc9
1 files changed, 8 insertions, 1 deletions
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 () {
51 mv ${D}${sbindir}/dhclient ${D}${base_sbindir}/ 51 mv ${D}${sbindir}/dhclient ${D}${base_sbindir}/
52 fi 52 fi
53 install -m 0755 ${S}/client/scripts/linux ${D}${base_sbindir}/dhclient-script 53 install -m 0755 ${S}/client/scripts/linux ${D}${base_sbindir}/dhclient-script
54
55 install -d ${D}${localstatedir}/lib/dhcp/
54} 56}
55 57
56PACKAGES += "dhcp-server dhcp-server-config dhcp-client dhcp-relay dhcp-omshell" 58PACKAGES += "dhcp-server dhcp-server-config dhcp-client dhcp-relay dhcp-omshell"
57 59
58FILES_${PN} = "" 60FILES_${PN} = ""
59 61
60FILES_dhcp-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server" 62FILES_dhcp-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server ${localstatedir}/lib/dhcp/"
61RRECOMMENDS_dhcp-server = "dhcp-server-config" 63RRECOMMENDS_dhcp-server = "dhcp-server-config"
62 64
63FILES_dhcp-server-config = "${sysconfdir}/default/dhcp-server ${sysconfdir}/dhcp/dhcpd.conf" 65FILES_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 ${
68RDEPENDS_dhcp-client = "bash" 70RDEPENDS_dhcp-client = "bash"
69 71
70FILES_dhcp-omshell = "${bindir}/omshell" 72FILES_dhcp-omshell = "${bindir}/omshell"
73
74pkg_postinst_dhcp-server() {
75 touch $D/${localstatedir}/lib/dhcp/dhcpd.leases
76 touch $D/${localstatedir}/lib/dhcp/dhcpd6.leases
77}