diff options
| author | Otavio Salvador <otavio@ossystems.com.br> | 2011-11-07 14:33:49 +0000 |
|---|---|---|
| committer | Koen Kooi <koen@dominion.thruhere.net> | 2011-11-07 17:22:19 +0100 |
| commit | 9292db41f1e1707e0c6864cedf95ce4d7b366e83 (patch) | |
| tree | a3aa6a0dc9cb32e369bd4b95fc956e2a280c71b0 | |
| parent | a94753610158a368216407a1a21039fe0c21bcc6 (diff) | |
| download | meta-openembedded-9292db41f1e1707e0c6864cedf95ce4d7b366e83.tar.gz | |
dhcp: add system support to dhcp-server
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
| -rw-r--r-- | meta-oe/recipes-connectivity/dhcp/dhcp_4.2.0.bbappend | 19 | ||||
| -rw-r--r-- | meta-oe/recipes-connectivity/dhcp/files/dhcpd.service | 12 |
2 files changed, 31 insertions, 0 deletions
diff --git a/meta-oe/recipes-connectivity/dhcp/dhcp_4.2.0.bbappend b/meta-oe/recipes-connectivity/dhcp/dhcp_4.2.0.bbappend new file mode 100644 index 0000000000..d47f1ce570 --- /dev/null +++ b/meta-oe/recipes-connectivity/dhcp/dhcp_4.2.0.bbappend | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | # look for files in the layer first | ||
| 2 | FILESEXTRAPATHS := "${THISDIR}/files" | ||
| 3 | |||
| 4 | inherit systemd | ||
| 5 | |||
| 6 | SYSTEMD_PACKAGES = "dhcp-server-systemd" | ||
| 7 | SYSTEMD_SERVICE_dhcp-server-systemd = "dhcpd.service" | ||
| 8 | |||
| 9 | SRC_URI += "file://dhcpd.service" | ||
| 10 | |||
| 11 | do_install_append() { | ||
| 12 | install -d ${D}${base_libdir}/systemd/system | ||
| 13 | install -m 644 ${WORKDIR}/dhcpd.service ${D}${base_libdir}/systemd/system | ||
| 14 | } | ||
| 15 | |||
| 16 | PACKAGES =+ "dhcp-server-systemd" | ||
| 17 | |||
| 18 | FILES_dhcp-server-systemd += "${base_libdir}/systemd" | ||
| 19 | RDEPENDS_dhcp-server-systemd += "dhcp-server" | ||
diff --git a/meta-oe/recipes-connectivity/dhcp/files/dhcpd.service b/meta-oe/recipes-connectivity/dhcp/files/dhcpd.service new file mode 100644 index 0000000000..70beee92e6 --- /dev/null +++ b/meta-oe/recipes-connectivity/dhcp/files/dhcpd.service | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | [Unit] | ||
| 2 | Description=Dynamic Host Configuration Protocol (DHCP) | ||
| 3 | After=syslog.target network.target | ||
| 4 | |||
| 5 | [Service] | ||
| 6 | Type=forking | ||
| 7 | PIDFile=/var/run/dhcpd.pid | ||
| 8 | EnvironmentFile=-/etc/default/dhcp-server | ||
| 9 | ExecStart=/usr/sbin/dhcpd -cf /etc/dhcp/dhcpd.conf -q $INTERFACES | ||
| 10 | |||
| 11 | [Install] | ||
| 12 | WantedBy=multi-user.target | ||
