diff options
-rw-r--r-- | generic/lib/systemd/system/utelnetd.service | 9 | ||||
-rw-r--r-- | rules/utelnetd.in | 6 | ||||
-rw-r--r-- | rules/utelnetd.make | 30 |
3 files changed, 24 insertions, 21 deletions
diff --git a/generic/lib/systemd/system/utelnetd.service b/generic/lib/systemd/system/utelnetd.service new file mode 100644 index 000000000..406f994ab --- /dev/null +++ b/generic/lib/systemd/system/utelnetd.service @@ -0,0 +1,9 @@ +[Unit] +Description=Telnet Server +After=syslog.target + +[Service] +ExecStart=/sbin/utelnetd + +[Install] +WantedBy=multi-user.target diff --git a/rules/utelnetd.in b/rules/utelnetd.in index 02e2f1edc..012713b64 100644 --- a/rules/utelnetd.in +++ b/rules/utelnetd.in @@ -13,4 +13,10 @@ config UTELNETD_STARTSCRIPT default y prompt "install /etc/init.d/utelnetd" +config UTELNETD_SYSTEMD_UNIT + bool + default y + depends on SYSTEMD + prompt "install systemd service files" + endif diff --git a/rules/utelnetd.make b/rules/utelnetd.make index f0467e6a1..883b24ecd 100644 --- a/rules/utelnetd.make +++ b/rules/utelnetd.make @@ -22,35 +22,17 @@ UTELNETD_URL := http://www.pengutronix.de/software/utelnetd/download/$(UTELNETD UTELNETD_SOURCE := $(SRCDIR)/$(UTELNETD).tar.gz UTELNETD_DIR := $(BUILDDIR)/$(UTELNETD) - -# ---------------------------------------------------------------------------- -# Get -# ---------------------------------------------------------------------------- - -$(UTELNETD_SOURCE): - @$(call targetinfo) - @$(call get, UTELNETD) - -# ---------------------------------------------------------------------------- -# Prepare -# ---------------------------------------------------------------------------- - -$(STATEDIR)/utelnetd.prepare: - @$(call targetinfo) - @$(call touch) - # ---------------------------------------------------------------------------- # Compile # ---------------------------------------------------------------------------- -UTELNETD_PATH := PATH=$(CROSS_PATH) -UTELNETD_ENV := PATH=$(CROSS_PATH) - UTELNETD_COMPILE_ENV := \ CROSS_COMPILE=$(COMPILER_PREFIX) \ $(CROSS_ENV_FLAGS) -UTELNETD_MAKEVARS := INSTDIR=/sbin +UTELNETD_INSTALL_OPT := \ + INSTDIR=/sbin \ + install # ---------------------------------------------------------------------------- # Target-Install @@ -82,6 +64,12 @@ ifneq ($(call remove_quotes,$(PTXCONF_UTELNETD_BBINIT_LINK)),) endif endif endif +ifdef PTXCONF_UTELNETD_SYSTEMD_UNIT + @$(call install_alternative, utelnetd, 0, 0, 0644, \ + /lib/systemd/system/utelnetd.service) + @$(call install_link, utelnetd, ../utelnetd.service, \ + /lib/systemd/system/multi-user.target.wants/utelnetd.service) +endif @$(call install_finish, utelnetd) |