diff options
author | Dexuan Cui <dexuan.cui@intel.com> | 2010-09-02 22:29:51 +0800 |
---|---|---|
committer | Saul Wold <Saul.Wold@intel.com> | 2010-09-02 15:19:33 -0700 |
commit | c398c16aa518fcf481263694f01ce133238b8748 (patch) | |
tree | 198e3a89299f94b6152057649ec9954ee4a3b5ff | |
parent | 883b09fefeacaabbc28c19c05c39c39c68b29dae (diff) | |
download | poky-c398c16aa518fcf481263694f01ce133238b8748.tar.gz |
cronie: add the latest version 1.4.4
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
-rwxr-xr-x | meta/recipes-extended/cronie/cronie/crond.init | 71 | ||||
-rw-r--r-- | meta/recipes-extended/cronie/cronie_1.4.4.bb | 31 |
2 files changed, 102 insertions, 0 deletions
diff --git a/meta/recipes-extended/cronie/cronie/crond.init b/meta/recipes-extended/cronie/cronie/crond.init new file mode 100755 index 0000000000..050c37e453 --- /dev/null +++ b/meta/recipes-extended/cronie/cronie/crond.init | |||
@@ -0,0 +1,71 @@ | |||
1 | #!/bin/sh | ||
2 | ### BEGIN INIT INFO | ||
3 | # Provides: crond crontab | ||
4 | # Default-Start: 2345 | ||
5 | # Default-Stop: 016 | ||
6 | # Short-Description: run cron daemon | ||
7 | # Description: cron is a standard UNIX program that runs user-specified | ||
8 | # programs at periodic scheduled times. vixie cron adds a | ||
9 | # number of features to the basic UNIX cron, including better | ||
10 | # security and more powerful configuration options. | ||
11 | ### END INIT INFO | ||
12 | |||
13 | CROND=/usr/sbin/crond | ||
14 | CONFIG=/etc/sysconfig/crond | ||
15 | |||
16 | [ -f $CONFIG ] || exit 1 | ||
17 | [ -x $CROND ] || exit 1 | ||
18 | |||
19 | . $CONFIG | ||
20 | |||
21 | # Source function library. | ||
22 | . /etc/init.d/functions | ||
23 | |||
24 | UID=`id -u` | ||
25 | |||
26 | case "$1" in | ||
27 | start) | ||
28 | if [ $UID -ne 0 ] ; then | ||
29 | echo "User has insufficient privilege." | ||
30 | exit 1 | ||
31 | fi | ||
32 | echo -n "Starting crond: " | ||
33 | start-stop-daemon --start --quiet --exec $CROND -- $CRONDARGS | ||
34 | RETVAL=$? | ||
35 | if [ $RETVAL -eq 0 ] ; then | ||
36 | echo "OK" | ||
37 | else | ||
38 | echo "FAIL" | ||
39 | fi | ||
40 | ;; | ||
41 | stop) | ||
42 | if [ $UID -ne 0 ] ; then | ||
43 | echo "User has insufficient privilege." | ||
44 | exit 1 | ||
45 | fi | ||
46 | echo -n "Stopping crond: " | ||
47 | start-stop-daemon --stop --quiet --pidfile /var/run/crond.pid | ||
48 | RETVAL=$? | ||
49 | if [ $RETVAL -eq 0 ] ; then | ||
50 | echo "OK" | ||
51 | else | ||
52 | echo "FAIL" | ||
53 | fi | ||
54 | ;; | ||
55 | status) | ||
56 | if [ -n "`/bin/pidof $CROND`" ] ; then | ||
57 | echo "crond is running." | ||
58 | else | ||
59 | echo "crond is not running." | ||
60 | fi | ||
61 | ;; | ||
62 | restart) | ||
63 | $0 stop && sleep 1 && $0 start | ||
64 | ;; | ||
65 | *) | ||
66 | echo "Usage: /etc/init.d/crond {start|stop|status|restart}" | ||
67 | exit 1 | ||
68 | esac | ||
69 | |||
70 | exit 0 | ||
71 | |||
diff --git a/meta/recipes-extended/cronie/cronie_1.4.4.bb b/meta/recipes-extended/cronie/cronie_1.4.4.bb new file mode 100644 index 0000000000..e9b146b894 --- /dev/null +++ b/meta/recipes-extended/cronie/cronie_1.4.4.bb | |||
@@ -0,0 +1,31 @@ | |||
1 | DESCRIPTION = "Cronie contains the standard UNIX daemon crond that runs \ | ||
2 | specified programs at scheduled times and related tools. It is based on the \ | ||
3 | original cron and has security and configuration enhancements like the \ | ||
4 | ability to use pam and SELinux." | ||
5 | HOMEPAGE = "https://fedorahosted.org/cronie/" | ||
6 | BUGTRACKER = "mmaslano@redhat.com" | ||
7 | |||
8 | # Internet Systems Consortium License | ||
9 | LICENSE = "ISC license & BSD" | ||
10 | LIC_FILES_CHKSUM = "file://COPYING;md5=963ea0772a2adbdcd607a9b2ec320c11 \ | ||
11 | file://src/cron.h;endline=20;md5=b425c334265026177128353a142633b4 \ | ||
12 | file://src/popen.c;beginline=3;endline=31;md5=edd50742d8def712e9472dba353668a9" | ||
13 | |||
14 | SECTION = "utils" | ||
15 | |||
16 | PR = "r0" | ||
17 | |||
18 | SRC_URI = "https://fedorahosted.org/releases/c/r/cronie/cronie-${PV}.tar.gz \ | ||
19 | file://crond.init" | ||
20 | |||
21 | inherit autotools update-rc.d | ||
22 | |||
23 | INITSCRIPT_NAME = "crond" | ||
24 | INITSCRIPT_PARAMS = "start 90 2 3 4 5 . stop 60 0 1 6 ." | ||
25 | |||
26 | do_install_append () { | ||
27 | install -d ${D}${sysconfdir}/sysconfig/ | ||
28 | install -d ${D}${sysconfdir}/init.d/ | ||
29 | install -m 0644 ${S}/crond.sysconfig ${D}${sysconfdir}/sysconfig/crond | ||
30 | install -m 0755 ${WORKDIR}/crond.init ${D}${sysconfdir}/init.d/crond | ||
31 | } | ||