diff mbox series

[meta-arago,master/kirkstone,1/2] systemd-telnetd: Unit files for starting telnetd under systemd

Message ID 20231019220436.28260-1-reatmon@ti.com
State Accepted
Delegated to: Ryan Eatmon
Headers show
Series [meta-arago,master/kirkstone,1/2] systemd-telnetd: Unit files for starting telnetd under systemd | expand

Commit Message

Ryan Eatmon Oct. 19, 2023, 10:04 p.m. UTC
With the recent changes to moving to systemd for all images, we lost the
needed files that started telnetd via the sysvinit method.  This just
adds the needed systemd files to do that directly.

Signed-off-by: Ryan Eatmon <reatmon@ti.com>
---
 .../systemd-telnetd/systemd-telnetd.bb        | 20 +++++++++++++
 .../systemd-telnetd/telnetd.service           | 29 +++++++++++++++++++
 2 files changed, 49 insertions(+)
 create mode 100644 meta-arago-distro/recipes-connectivity/systemd-telnetd/systemd-telnetd.bb
 create mode 100644 meta-arago-distro/recipes-connectivity/systemd-telnetd/systemd-telnetd/telnetd.service
diff mbox series

Patch

diff --git a/meta-arago-distro/recipes-connectivity/systemd-telnetd/systemd-telnetd.bb b/meta-arago-distro/recipes-connectivity/systemd-telnetd/systemd-telnetd.bb
new file mode 100644
index 00000000..3158da5a
--- /dev/null
+++ b/meta-arago-distro/recipes-connectivity/systemd-telnetd/systemd-telnetd.bb
@@ -0,0 +1,20 @@ 
+SUMMARY = "telnetd"
+DESCRIPTION = "systemd config for starting telnetd."
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://telnetd.service;beginline=1;endline=17;md5=d134d0d385c53f9201a270fef8448f29"
+
+SRC_URI = "file://telnetd.service"
+
+S = "${WORKDIR}"
+
+inherit systemd
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE:${PN} = "telnetd.service"
+SYSTEMD_AUTO_ENABLE:${PN} = "enable"
+
+do_install:append () {
+    # install systemd unit files
+    install -d ${D}${systemd_system_unitdir}
+    install -m 0644 ${WORKDIR}/telnetd.service ${D}${systemd_system_unitdir}
+}
diff --git a/meta-arago-distro/recipes-connectivity/systemd-telnetd/systemd-telnetd/telnetd.service b/meta-arago-distro/recipes-connectivity/systemd-telnetd/systemd-telnetd/telnetd.service
new file mode 100644
index 00000000..d8b34373
--- /dev/null
+++ b/meta-arago-distro/recipes-connectivity/systemd-telnetd/systemd-telnetd/telnetd.service
@@ -0,0 +1,29 @@ 
+#Permission is hereby granted, free of charge, to any person obtaining a copy
+#of this software and associated documentation files (the "Software"), to deal
+#in the Software without restriction, including without limitation the rights
+#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+#copies of the Software, and to permit persons to whom the Software is
+#furnished to do so, subject to the following conditions:
+#
+#The above copyright notice and this permission notice shall be included in
+#all copies or substantial portions of the Software.
+#
+#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+#THE SOFTWARE.
+
+[Unit]
+Description=Telnet Server
+After=local-fs.target
+
+[Service]
+RemainAfterExit=true
+Type=oneshot
+ExecStart=/usr/sbin/telnetd
+
+[Install]
+WantedBy=multi-user.target