From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 25EA1158083 for ; Tue, 17 Sep 2024 20:30:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5AC9EE29A4; Tue, 17 Sep 2024 20:30:21 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3DB7EE29A4 for ; Tue, 17 Sep 2024 20:30:21 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 77B7D33BE32 for ; Tue, 17 Sep 2024 20:30:20 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D1661B6B for ; Tue, 17 Sep 2024 20:30:18 +0000 (UTC) From: "Mike Gilbert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" Message-ID: <1726604959.9a965c94f7222bb3dab558c49f24e2cc6cb98783.floppym@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/inetutils/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-misc/inetutils/inetutils-2.5-r3.ebuild net-misc/inetutils/inetutils-2.5-r4.ebuild X-VCS-Directories: net-misc/inetutils/ X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: 9a965c94f7222bb3dab558c49f24e2cc6cb98783 X-VCS-Branch: master Date: Tue, 17 Sep 2024 20:30:18 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: c12d7549-e4ce-42a2-8b04-01b7479a0f4f X-Archives-Hash: bd143b3125e1472b213ac87354e13e94 commit: 9a965c94f7222bb3dab558c49f24e2cc6cb98783 Author: Mike Gilbert gentoo org> AuthorDate: Tue Sep 17 02:46:15 2024 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Tue Sep 17 20:29:19 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a965c94 net-misc/inetutils: install init scripts Signed-off-by: Mike Gilbert gentoo.org> ...utils-2.5-r3.ebuild => inetutils-2.5-r4.ebuild} | 54 +++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/net-misc/inetutils/inetutils-2.5-r3.ebuild b/net-misc/inetutils/inetutils-2.5-r4.ebuild similarity index 69% rename from net-misc/inetutils/inetutils-2.5-r3.ebuild rename to net-misc/inetutils/inetutils-2.5-r4.ebuild index 82f4a8ee053b..8604c35cfe10 100644 --- a/net-misc/inetutils/inetutils-2.5-r3.ebuild +++ b/net-misc/inetutils/inetutils-2.5-r4.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit pam +inherit pam systemd DESCRIPTION="Collection of common network programs" HOMEPAGE="https://www.gnu.org/software/inetutils/" @@ -77,6 +77,46 @@ iu_pamd() { fi } +create_init() { + use "$1" || return + + newinitd - "$1" <<-EOF + #!${EPREFIX}/sbin/openrc-run + command="${EPREFIX}/usr/libexec/$1" + command_args="$2" + pidfile="${EPREFIX}/var/run/$1.pid" + EOF + + systemd_newunit - "$1.service" <<-EOF + [Service] + ExecStart="${EPREFIX}/usr/libexec/$1"${2:+ }$2 + PIDFile=${EPREFIX}/var/run/$1.pid + Type=forking + + [Install] + WantedBy=multi-user.target + EOF +} + +create_socket() { + systemd_newunit - "$1.socket" <<-EOF + [Socket] + ListenStream=$2 + Accept=yes + + [Install] + WantedBy=sockets.target + EOF + + systemd_newunit - "$1@.service" <<-EOF + [Service] + CollectMode=inactive-or-failed + ExecStart="${EPREFIX}/usr/libexec/$1" + StandardInput=socket + StandardError=journal + EOF +} + src_install() { default iu_pamd rexecd rexec @@ -86,4 +126,16 @@ src_install() { iu_pamd rlogind krlogin iu_pamd rshd krsh fi + + create_init ftpd --daemon + create_init inetd + create_init rlogind --daemon + create_init syslogd + + create_socket ftpd 21 + create_socket rexecd 512 + create_socket rlogind 513 + create_socket rshd 514 + create_socket telnetd 23 + create_socket uucpd 540 }