commit:     ee9dcea0ca6023d17537c1f40a251af9f2e8f839
Author:     Viorel Munteanu <ceamac.paragon <AT> gmail <DOT> com>
AuthorDate: Wed Apr 20 05:13:32 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jun 30 21:40:16 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee9dcea0

sys-apps/busybox: Add openrc files for crond

Closes: https://bugs.gentoo.org/751988
Signed-off-by: Viorel Munteanu <ceamac.paragon <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-apps/busybox/busybox-1.34.1-r1.ebuild |  4 ++++
 sys-apps/busybox/files/crond.confd        |  2 ++
 sys-apps/busybox/files/crond.initd        | 12 ++++++++++++
 3 files changed, 18 insertions(+)

diff --git a/sys-apps/busybox/busybox-1.34.1-r1.ebuild 
b/sys-apps/busybox/busybox-1.34.1-r1.ebuild
index 654edbe4c4b7..80086ac713ca 100644
--- a/sys-apps/busybox/busybox-1.34.1-r1.ebuild
+++ b/sys-apps/busybox/busybox-1.34.1-r1.ebuild
@@ -293,6 +293,10 @@ src_install() {
        if busybox_config_enabled ASH && ! use make-symlinks; then
                dosym -r /bin/busybox /bin/ash
        fi
+       if busybox_config_enabled CROND; then
+               newconfd "${FILESDIR}"/crond.confd busybox-crond
+               newinitd "${FILESDIR}"/crond.initd busybox-crond
+       fi
 
        # bundle up the symlink files for use later
        emake DESTDIR="${ED}" install

diff --git a/sys-apps/busybox/files/crond.confd 
b/sys-apps/busybox/files/crond.confd
new file mode 100644
index 000000000000..707366252913
--- /dev/null
+++ b/sys-apps/busybox/files/crond.confd
@@ -0,0 +1,2 @@
+# Config file for /etc/init.d/busybox-crond
+CRONDARGS=

diff --git a/sys-apps/busybox/files/crond.initd 
b/sys-apps/busybox/files/crond.initd
new file mode 100644
index 000000000000..e098b14714a4
--- /dev/null
+++ b/sys-apps/busybox/files/crond.initd
@@ -0,0 +1,12 @@
+#!/sbin/openrc-run
+# Copyright 1999-2021 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command="/bin/busybox crond"
+command_args="${CRONDARGS}"
+pidfile="/run/crond.pid"
+
+depend() {
+       need clock logger
+       provide cron
+}

Reply via email to