Gentoo Archives: gentoo-commits

From: Conrad Kostecki <conikost@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-process/fcron/files/
Date: Sun, 05 Dec 2021 21:46:05
Message-Id: 1638740718.bc99d30840a1f0530b16eba3fa2c6bfd1e0059b1.conikost@gentoo
1 commit: bc99d30840a1f0530b16eba3fa2c6bfd1e0059b1
2 Author: Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
3 AuthorDate: Fri Dec 3 16:41:18 2021 +0000
4 Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 5 21:45:18 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc99d308
7
8 sys-process/fcron: remove unused file
9
10 Closes: https://github.com/gentoo/gentoo/pull/23170
11 Package-Manager: Portage-3.0.28, Repoman-3.0.3
12 Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
13 Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
14
15 sys-process/fcron/files/fcron.init.4 | 98 ------------------------------------
16 1 file changed, 98 deletions(-)
17
18 diff --git a/sys-process/fcron/files/fcron.init.4 b/sys-process/fcron/files/fcron.init.4
19 deleted file mode 100644
20 index e253e5bffcfe..000000000000
21 --- a/sys-process/fcron/files/fcron.init.4
22 +++ /dev/null
23 @@ -1,98 +0,0 @@
24 -#!/sbin/openrc-run
25 -# Copyright 1999-2016 Gentoo Foundation
26 -# Distributed under the terms of the GNU General Public License v2
27 -
28 -FCRON_INSTANCE="${SVCNAME##*.}"
29 -
30 -if [ -n "${FCRON_INSTANCE}" ] && [ "${SVCNAME}" != "fcron" ]; then
31 - FCRON_CONFIGFILE="/etc/fcron/fcron.${FCRON_INSTANCE}.conf"
32 -else
33 - FCRON_CONFIGFILE="/etc/fcron/fcron.conf"
34 -fi
35 -
36 -getconfig() {
37 - local key="$1"
38 - local value_default="$2"
39 - local value=
40 -
41 - if service_started; then
42 - value="$(service_get_value "${key}")"
43 - fi
44 -
45 - if [ -z "${value}" ] && [ -r "${FCRON_CONFIGFILE}" ]; then
46 - value="$(sed -n -e 's:^'"${key}"'[ \t]*=[ \t]*::p' "${FCRON_CONFIGFILE}")"
47 - fi
48 -
49 - if [ -z "${value}" ]; then
50 - # Value not explicitly set in the configfile or configfile does not exist
51 - # or is not readable
52 - echo "${value_default}"
53 - else
54 - echo "${value}"
55 - fi
56 -
57 - return 0
58 -}
59 -
60 -depend() {
61 - config "${FCRON_CONFIGFILE}"
62 -
63 - use clock logger
64 - need hostname
65 -
66 - # provide the cron service if we are the main instance
67 - [ "${SVCNAME}" = "fcron" ] && provide cron
68 -}
69 -
70 -command="/usr/libexec/fcron"
71 -command_args="-c \"${FCRON_CONFIGFILE}\""
72 -start_stop_daemon_args=${FCRON_SSDARGS:-"--wait 1000"}
73 -pidfile="$(getconfig pidfile /run/fcron.pid)"
74 -fcrontabs="$(getconfig fcrontabs /var/spool/fcron)"
75 -fifofile="$(getconfig fifofile /run/fcron.fifo)"
76 -required_files="${FCRON_CONFIGFILE}"
77 -
78 -extra_started_commands="reload"
79 -
80 -reload() {
81 - start-stop-daemon --signal HUP --pidfile "${pidfile}"
82 -}
83 -
84 -start_pre() {
85 - if [ "${SVCNAME}" != "fcron" ]; then
86 - local _has_invalid_instance_cfg=0
87 -
88 - if [ "${pidfile}" = "/run/fcron.pid" ]; then
89 - eerror "You cannot use the same pidfile like the default instance!"
90 - eerror "Please adjust your 'pidfile' setting in '${FCRON_CONFIGFILE}'."
91 - _has_invalid_instance_cfg=1
92 - fi
93 -
94 - if [ "${fcrontabs}" = "/var/spool/fcron" ]; then
95 - eerror "You cannot use the same fcrontabs location like the default instance!"
96 - eerror "Please adjust your 'fcrontabs' setting in '${FCRON_CONFIGFILE}'."
97 - _has_invalid_instance_cfg=1
98 - fi
99 -
100 - if [ "${fifofile}" = "/run/fcron.fifo" ]; then
101 - eerror "You cannot use the same fifo file like the default instance!"
102 - eerror "Please adjust your 'fifofile' setting in '${FCRON_CONFIGFILE}'."
103 - _has_invalid_instance_cfg=1
104 - fi
105 -
106 - [ ${_has_invalid_instance_cfg} -ne 0 ] && return 1
107 - fi
108 -
109 - checkpath --file "${FCRON_CONFIGFILE}" --owner root:fcron --mode 0640
110 -
111 - if [ ! -d "${fcrontabs}" ]; then
112 - ebegin "Creating missing spooldir '${fcrontabs}'"
113 - ${command} --newspooldir "${fcrontabs}"
114 - eend $?
115 - fi
116 -}
117 -
118 -start_post() {
119 - service_set_value fcrontabs "${fcrontabs}"
120 - service_set_value fifofile "${fifofile}"
121 -}