diff options
Diffstat (limited to 'meta/recipes-connectivity/dhcp/dhcp.inc')
-rw-r--r-- | meta/recipes-connectivity/dhcp/dhcp.inc | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/meta/recipes-connectivity/dhcp/dhcp.inc b/meta/recipes-connectivity/dhcp/dhcp.inc index 512127cd4c..a1752548be 100644 --- a/meta/recipes-connectivity/dhcp/dhcp.inc +++ b/meta/recipes-connectivity/dhcp/dhcp.inc | |||
@@ -14,11 +14,19 @@ DEPENDS = "openssl bind" | |||
14 | 14 | ||
15 | SRC_URI = "ftp://ftp.isc.org/isc/dhcp/${PV}/dhcp-${PV}.tar.gz \ | 15 | SRC_URI = "ftp://ftp.isc.org/isc/dhcp/${PV}/dhcp-${PV}.tar.gz \ |
16 | file://site.h \ | 16 | file://site.h \ |
17 | file://init-relay file://default-relay \ | 17 | file://init-relay file://default-relay \ |
18 | file://init-server file://default-server \ | 18 | file://init-server file://default-server \ |
19 | file://dhclient.conf file://dhcpd.conf" | 19 | file://dhclient.conf file://dhcpd.conf \ |
20 | file://dhcpd.service file://dhcrelay.service" | ||
20 | 21 | ||
21 | inherit autotools | 22 | inherit autotools systemd |
23 | |||
24 | SYSTEMD_PACKAGES = "dhcp-server dhcp-relay" | ||
25 | SYSTEMD_SERVICE_dhcp-server = "dhcpd.service" | ||
26 | SYSTEMD_AUTO_ENABLE_dhcp-server = "disable" | ||
27 | |||
28 | SYSTEMD_SERVICE_dhcp-relay = "dhcrelay.service" | ||
29 | SYSTEMD_AUTO_ENABLE_dhcp-relay = "disable" | ||
22 | 30 | ||
23 | TARGET_CFLAGS += "-D_GNU_SOURCE" | 31 | TARGET_CFLAGS += "-D_GNU_SOURCE" |
24 | EXTRA_OECONF = "--with-srv-lease-file=${localstatedir}/lib/dhcp/dhcpd.leases \ | 32 | EXTRA_OECONF = "--with-srv-lease-file=${localstatedir}/lib/dhcp/dhcpd.leases \ |
@@ -51,6 +59,13 @@ do_install_append () { | |||
51 | mv ${D}${sbindir}/dhclient ${D}${base_sbindir}/ | 59 | mv ${D}${sbindir}/dhclient ${D}${base_sbindir}/ |
52 | fi | 60 | fi |
53 | install -m 0755 ${S}/client/scripts/linux ${D}${base_sbindir}/dhclient-script | 61 | install -m 0755 ${S}/client/scripts/linux ${D}${base_sbindir}/dhclient-script |
62 | |||
63 | # Install systemd unit files | ||
64 | install -d ${D}${systemd_unitdir}/system | ||
65 | install -m 0644 ${WORKDIR}/dhcpd.service ${D}${systemd_unitdir}/system | ||
66 | install -m 0644 ${WORKDIR}/dhcrelay.service ${D}${systemd_unitdir}/system | ||
67 | sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/dhcpd.service ${D}${systemd_unitdir}/system/dhcrelay.service | ||
68 | sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/dhcpd.service | ||
54 | } | 69 | } |
55 | 70 | ||
56 | PACKAGES += "dhcp-server dhcp-server-config dhcp-client dhcp-relay dhcp-omshell" | 71 | PACKAGES += "dhcp-server dhcp-server-config dhcp-client dhcp-relay dhcp-omshell" |