From: | "Diego Petteno (flameeyes)" <flameeyes@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in sys-process/fcron/files: fcron.init.3 fcrontab.2 |
Date: | Wed, 29 Aug 2012 17:39:05 |
Message-Id: | 20120829173841.115D520B7D@flycatcher.gentoo.org |
1 | flameeyes 12/08/29 17:38:40 |
2 | |
3 | Added: fcron.init.3 fcrontab.2 |
4 | Log: |
5 | Remove old. Add new ebuild that avoid spitting pages-long documentation and instead relies on users knowing what they are doing and use pkg_config to set up the package with its systab. Do not change files' permissions at postinst time as that's bad practice. |
6 | |
7 | (Portage version: 2.2.0_alpha123/cvs/Linux x86_64) |
8 | |
9 | Revision Changes Path |
10 | 1.1 sys-process/fcron/files/fcron.init.3 |
11 | |
12 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/fcron/files/fcron.init.3?rev=1.1&view=markup |
13 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/fcron/files/fcron.init.3?rev=1.1&content-type=text/plain |
14 | |
15 | Index: fcron.init.3 |
16 | =================================================================== |
17 | #!/sbin/runscript |
18 | # Copyright 1999-2012 Gentoo Foundation |
19 | # Distributed under the terms of the GNU General Public License v2 |
20 | # $Header: /var/cvsroot/gentoo-x86/sys-process/fcron/files/fcron.init.3,v 1.1 2012/08/29 17:38:40 flameeyes Exp $ |
21 | |
22 | FCRON_INSTANCE=${SVCNAME##*.} |
23 | |
24 | configfile() { |
25 | if [ -n "${FCRON_INSTANCE}" -a "${SVCNAME}" != "fcron" ]; then |
26 | echo /etc/fcron/fcron.${FCRON_INSTANCE}.conf |
27 | else |
28 | echo /etc/fcron/fcron.conf |
29 | fi |
30 | } |
31 | |
32 | getconfig() { |
33 | # if there is no configuration file return the default value |
34 | if ! [ -f $(configfile) ]; then |
35 | echo $2 |
36 | return 0 |
37 | fi |
38 | |
39 | sed -n -e 's:^$1[ \t]*=[ \t]*::p' $(configfile) |
40 | } |
41 | |
42 | depend() { |
43 | config $(configfile) |
44 | |
45 | use logger |
46 | need clock hostname |
47 | # provide the cron service if we are the main instance |
48 | [ "${SVCNAME}" = "fcron" ] && provide cron |
49 | } |
50 | |
51 | command="/usr/libexec/fcron" |
52 | command_args="-c $(configfile)" |
53 | pidfile=$(getconfig pidfile /var/run/fcron.pid) |
54 | fcrontabs=$(getconfig fcrontabs /var/spool/fcron) |
55 | |
56 | extra_started_commands="reload" |
57 | |
58 | start_pre() { |
59 | if [ ! -e $(configfile) ]; then |
60 | eerror "You will need to create $(configfile) first" |
61 | eerror "There is a sample in /etc/fcron" |
62 | return 1 |
63 | fi |
64 | |
65 | if [ ! -d ${fcrontabs} ]; then |
66 | ebegin "Creating missing spooldir ${fcrontabs}" |
67 | ${command} --newspooldir ${fcrontabs} |
68 | eend $? |
69 | fi |
70 | } |
71 | |
72 | reload() { |
73 | kill -HUP `cat ${pidfile}` |
74 | } |
75 | |
76 | |
77 | |
78 | 1.1 sys-process/fcron/files/fcrontab.2 |
79 | |
80 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/fcron/files/fcrontab.2?rev=1.1&view=markup |
81 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/fcron/files/fcrontab.2?rev=1.1&content-type=text/plain |
82 | |
83 | Index: fcrontab.2 |
84 | =================================================================== |
85 | # $Header: /var/cvsroot/gentoo-x86/sys-process/fcron/files/fcrontab.2,v 1.1 2012/08/29 17:38:40 flameeyes Exp $ |
86 | # Script for checking system crontabs and creating the fcron systab. |
87 | # Runs every 10 minutes, does not mail output, doesn't log job runs |
88 | # except for errors. |
89 | @mail(false),nolog(true) 10 /usr/libexec/check_system_crontabs -s 0 |