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>
This commit is contained in:
Otavio Salvador
2011-11-07 14:33:49 +00:00
committed by Koen Kooi
parent a947536101
commit 9292db41f1
2 changed files with 31 additions and 0 deletions
@@ -0,0 +1,19 @@
# look for files in the layer first
FILESEXTRAPATHS := "${THISDIR}/files"
inherit systemd
SYSTEMD_PACKAGES = "dhcp-server-systemd"
SYSTEMD_SERVICE_dhcp-server-systemd = "dhcpd.service"
SRC_URI += "file://dhcpd.service"
do_install_append() {
install -d ${D}${base_libdir}/systemd/system
install -m 644 ${WORKDIR}/dhcpd.service ${D}${base_libdir}/systemd/system
}
PACKAGES =+ "dhcp-server-systemd"
FILES_dhcp-server-systemd += "${base_libdir}/systemd"
RDEPENDS_dhcp-server-systemd += "dhcp-server"
@@ -0,0 +1,12 @@
[Unit]
Description=Dynamic Host Configuration Protocol (DHCP)
After=syslog.target network.target
[Service]
Type=forking
PIDFile=/var/run/dhcpd.pid
EnvironmentFile=-/etc/default/dhcp-server
ExecStart=/usr/sbin/dhcpd -cf /etc/dhcp/dhcpd.conf -q $INTERFACES
[Install]
WantedBy=multi-user.target