diff --git a/recipes-apps/sysmocom-udhcpd-config/files/sysmocom-bsc/udhcpd.service b/recipes-apps/sysmocom-udhcpd-config/files/sysmocom-bsc/udhcpd.service new file mode 100644 index 0000000..6b92866 --- /dev/null +++ b/recipes-apps/sysmocom-udhcpd-config/files/sysmocom-bsc/udhcpd.service @@ -0,0 +1,9 @@ +[Unit] +Description=UDHCPD + +[Service] +Type=simple +ExecStart=/usr/sbin/udhcpd -fS /etc/udhcpd.conf + +[Install] +WantedBy=multi-user.target diff --git a/recipes-apps/sysmocom-udhcpd-config/sysmocom-udhcpd-config_1.bb b/recipes-apps/sysmocom-udhcpd-config/sysmocom-udhcpd-config_1.bb index 2e3425e..c246a3c 100644 --- a/recipes-apps/sysmocom-udhcpd-config/sysmocom-udhcpd-config_1.bb +++ b/recipes-apps/sysmocom-udhcpd-config/sysmocom-udhcpd-config_1.bb @@ -3,12 +3,18 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" -SRC_URI = "file://udhcpd.conf" -PR = "r3" +SRC_URI = "file://udhcpd.conf \ + file://udhcpd.service \ + " +PR = "r4" CONFFILES_${PN} = "${sysconfdir}/udhcpd.conf" +FILES_${PN} += "${systemd_unitdir}" do_install() { install -d ${D}${sysconfdir} install -m 0644 ${WORKDIR}/udhcpd.conf ${D}${sysconfdir}/ + install -d ${D}${systemd_unitdir}/system/multi-user.target.wants/ + install -m 0644 /${WORKDIR}/udhcpd.service ${D}${systemd_unitdir}/system/ + ln -sf ../udhcpd.service ${D}${systemd_unitdir}/system/multi-user.target.wants/ }