tftp-hpa: add systemd unit files
PATCH 1/2 tftp-hpa: add systemd unit files
From: Chen Qi <[email protected]>
Add systemd unit files for tftp-hpa.
Signed-off-by Chen Qi <[email protected]>
--- .../recipes-daemons/tftp-hpa/files/tftpd-hpa.service | 10 ++++++++++ .../recipes-daemons/tftp-hpa/files/tftpd-hpa.socket | 8 ++++++++ meta-networking/recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb | 12 +++++++++++- 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 meta-networking/recipes-daemons/tftp-hpa/files/tftpd-hpa.service create mode 100644 meta-networking/recipes-daemons/tftp-hpa/files/tftpd-hpa.socket
meta-networking/recipes-daemons/tftp-hpa/files/tftpd-hpa.service new file +10 -0
@@ -0,0 +1,10 @@ +[Unit] +Description=Tftp Server +Requires=tftpd-hpa.socket + +[Service] +ExecStart=@SBINDIR@/in.tftpd-hpa -s /var/lib/tftpboot +StandardInput=socket + +[Install] +Also=tftpd-hpa.socket
meta-networking/recipes-daemons/tftp-hpa/files/tftpd-hpa.socket new file +8 -0
@@ -0,0 +1,8 @@ +[Unit] +Description=Tftp Server Activation Socket + +[Socket] +ListenDatagram=69 + +[Install] +WantedBy=sockets.target
meta-networking/recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb +11 -1
@@ -26,12 +26,14 @@ SRC_URI = "http://kernel.org/pub/software/network/tftp/tftp-hpa/tftp-hpa-${PV}.t file://add-error-check-for-disk-filled-up.patch \ file://tftp-hpa-bug-fix-on-separated-CR-and-LF.patch \ file://fix-writing-emtpy-file.patch \ + file://tftpd-hpa.socket \ + file://tftpd-hpa.service \ " SRC_URI[md5sum] = "46c9bd20bbffa62f79c958c7b99aac21" SRC_URI[sha256sum] = "0a9f88d4c1c02687b4853b02ab5dd8779d4de4ffdb9b2e5c9332841304d1a269" -inherit autotools-brokensep update-rc.d update-alternatives +inherit autotools-brokensep update-rc.d update-alternatives systemd export AR = "${HOST_PREFIX}ar cq"
@@ -60,6 +62,11 @@ do_install() { install -d ${D}${sysconfdir}/default install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/tftpd-hpa + + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/tftpd-hpa.socket ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/tftpd-hpa.service ${D}${systemd_unitdir}/system + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/tftpd-hpa.service } FILES_${PN} = "${bindir}"
@@ -77,3 +84,6 @@ ALTERNATIVE_${PN} = "tftp" ALTERNATIVE_TARGET[tftp] = "${bindir}/tftp-hpa" ALTERNATIVE_PRIORITY = "50" +SYSTEMD_PACKAGES = "tftp-hpa-server" +SYSTEMD_SERVICE_tftp-hpa-server = "tftpd-hpa.socket tftpd-hpa.service" +SYSTEMD_AUTO_ENABLE_tftp-hpa-server = "enable"
Signature · 1 line
1.9.1
PATCH 2/2 webmin: add systemd service file
From: Chen Qi <[email protected]>
Add systemd service file for webmin.
Signed-off-by Chen Qi <[email protected]>
--- .../recipes-webadmin/webmin/files/webmin.service | 14 ++++++++++++++ meta-webserver/recipes-webadmin/webmin/webmin_1.801.bb | 12 +++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 meta-webserver/recipes-webadmin/webmin/files/webmin.service
meta-webserver/recipes-webadmin/webmin/files/webmin.service new file +14 -0
@@ -0,0 +1,14 @@ +[Unit] +Description=Webmin Admin Tool +Requires=local-fs.target +After=basic.target +Conflicts=shutdown.target + +[Service] +Type=oneshot +ExecStart=@LIBEXECDIR@/webmin/miniserv.pl @SYSCONFDIR@/webmin/miniserv.conf +RemainAfterExit=yes +PrivateTmp=true + +[Install] +WantedBy=multi-user.target
meta-webserver/recipes-webadmin/webmin/webmin_1.801.bb +11 -1
@@ -18,12 +18,13 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/webadmin/webmin-${PV}.tar.gz \ file://media-tomb.patch \ file://remove-python2.3.patch \ file://mysql-config-fix.patch \ + file://webmin.service \ " SRC_URI[md5sum] = "91d05b4e31ad1bd14bab14e0f155c088" SRC_URI[sha256sum] = "ad477edb41dc1a900448afc8b5528e136b3778d2d303f23bc564afb975eb5bed" -inherit perlnative update-rc.d +inherit perlnative update-rc.d systemd do_configure() { # Remove binaries and plugins for other platforms
@@ -77,6 +78,12 @@ do_install() { install -d ${D}${sysconfdir}/init.d install -m 0755 webmin-init ${D}${sysconfdir}/init.d/webmin + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/webmin.service ${D}${systemd_unitdir}/system + sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' \ + -e 's,@SYSCONFDIR@,${sysconfdir},g' \ + ${D}${systemd_unitdir}/system/webmin.service + install -d ${D}${localstatedir} install -d ${D}${localstatedir}/webmin
@@ -114,6 +121,9 @@ do_install() { INITSCRIPT_NAME = "webmin" INITSCRIPT_PARAMS = "start 99 5 3 2 . stop 10 0 1 6 ." +SYSTEMD_SERVICE_${PN} = "webmin.service" +SYSTEMD_AUTO_ENABLE_${PN} = "disable" + # FIXME: some of this should be figured out automatically RDEPENDS_${PN} += "perl perl-module-socket perl-module-exporter perl-module-exporter-heavy perl-module-carp perl-module-strict" RDEPENDS_${PN} += "perl-module-warnings perl-module-xsloader perl-module-posix perl-module-autoloader"
Signature · 1 line
1.9.1