All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit branch/next] package/busybox: add systemd service for telnetd
@ 2021-08-27 21:26 Yann E. MORIN
  0 siblings, 0 replies; only message in thread
From: Yann E. MORIN @ 2021-08-27 21:26 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=e1ddac352de6c86511a1a27efd8e79495519bcd8
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/next

Signed-off-by: Sam Voss <sam.voss@collins.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
[yann.morin.1998@free.fr:
  - introduce BUSYBOX_INSTALL_TELNET_SERVICE
  - move _INSTALL_INIT_SYSTEMD alphabetically between openrc and sysv
  - drop the comment about Type=simple  (Arnout)
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
 package/busybox/busybox.mk      | 10 ++++++++++
 package/busybox/telnetd.service | 10 ++++++++++
 2 files changed, 20 insertions(+)

diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
index 4b1fbade1d..560c4fe7b6 100644
--- a/package/busybox/busybox.mk
+++ b/package/busybox/busybox.mk
@@ -332,6 +332,12 @@ define BUSYBOX_INSTALL_TELNET_SCRIPT
 			$(TARGET_DIR)/etc/init.d/S50telnet ; \
 	fi
 endef
+define BUSYBOX_INSTALL_TELNET_SERVICE
+	if grep -q CONFIG_FEATURE_TELNETD_STANDALONE=y $(@D)/.config; then \
+		$(INSTALL) -D -m 0644 package/busybox/telnetd.service \
+			$(TARGET_DIR)/usr/lib/systemd/system/telnetd.service ; \
+	fi
+endef
 
 # Add /bin/{a,hu}sh to /etc/shells otherwise some login tools like dropbear
 # can reject the user connection. See man shells.
@@ -384,6 +390,10 @@ define BUSYBOX_INSTALL_INIT_OPENRC
 	$(BUSYBOX_INSTALL_TELNET_SCRIPT)
 endef
 
+define BUSYBOX_INSTALL_INIT_SYSTEMD
+	$(BUSYBOX_INSTALL_TELNET_SERVICE)
+endef
+
 define BUSYBOX_INSTALL_INIT_SYSV
 	$(BUSYBOX_INSTALL_MDEV_SCRIPT)
 	$(BUSYBOX_INSTALL_LOGGING_SCRIPT)
diff --git a/package/busybox/telnetd.service b/package/busybox/telnetd.service
new file mode 100644
index 0000000000..8a640b761f
--- /dev/null
+++ b/package/busybox/telnetd.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Telnetd Service
+After=network.target
+
+[Service]
+Type=simple
+ExecStart=/usr/sbin/telnetd -F
+
+[Install]
+WantedBy=multi-user.target
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-27 21:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-27 21:26 [Buildroot] [git commit branch/next] package/busybox: add systemd service for telnetd Yann E. MORIN

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.