[Buildroot] [External] Re: [PATCH 1/1] package/busybox: add systemd service for telnetd

Voss, Samuel M Collins sam.voss at collins.com
Fri Aug 27 15:50:19 UTC 2021


Arnout,

> -----Original Message-----
> From: Arnout Vandecappelle <arnout at mind.be>
> Sent: Thursday, August 26, 2021 5:01 PM
> To: Voss, Samuel M Collins <sam.voss at collins.com>;
> buildroot at buildroot.org
> Subject: [External] Re: [Buildroot] [PATCH 1/1] package/busybox: add
> systemd service for telnetd
> 
> 
> 
> On 26/08/2021 23:02, Sam Voss via buildroot wrote:
> > Signed-off-by: Sam Voss <sam.voss at collins.com>
> > ---
> >  package/busybox/busybox.mk      |  7 +++++++
> >  package/busybox/telnetd.service | 11 +++++++++++
> >  2 files changed, 18 insertions(+)
> >  create mode 100644 package/busybox/telnetd.service
> >
> > diff --git a/package/busybox/busybox.mk
> b/package/busybox/busybox.mk
> > index cfc06b0d78..fb427faf1c 100644
> > --- a/package/busybox/busybox.mk
> > +++ b/package/busybox/busybox.mk
> > @@ -378,6 +378,13 @@ define BUSYBOX_INSTALL_TARGET_CMDS
> >  	$(BUSYBOX_INSTALL_MDEV_CONF)
> >  endef
> >
> > +define BUSYBOX_INSTALL_INIT_SYSTEMD
> > +	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
> > +
> >  # Install the sysvinit scripts, for the moment, but not those that
> > already  # have a corresponding one in openrc.
> >  define BUSYBOX_INSTALL_INIT_OPENRC
> > diff --git a/package/busybox/telnetd.service
> > b/package/busybox/telnetd.service new file mode 100644 index
> > 0000000000..3c1fa457b1
> > --- /dev/null
> > +++ b/package/busybox/telnetd.service
> > @@ -0,0 +1,11 @@
> > +[Unit]
> > +Description=Telnetd Service
> > +After=network.target
> > +
> > +[Service]
> > +# busybox telnet doesn't support pidfile, so run in foreground
> 
>  AFAIU Type=simple is anyway the preferred type for services without
> specific systemd support, so I don't think this comment is very useful...

Fair enough, I didn't know that was the specific guidance, so I'm okay with dropping that comment when applying.

Thanks for letting me know,

Sam

> 
>  Regardless:
> 
> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout at mind.be>
> 
>  Regards,
>  Arnout
> 
> > +Type=simple
> > +ExecStart=/usr/sbin/telnetd -F
> > +
> > +[Install]
> > +WantedBy=multi-user.target
> >


More information about the buildroot mailing list