summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-extended/cronie/cronie_1.4.8.bb33
1 files changed, 15 insertions, 18 deletions
diff --git a/meta/recipes-extended/cronie/cronie_1.4.8.bb b/meta/recipes-extended/cronie/cronie_1.4.8.bb
index 064347e9d5..2d256277bc 100644
--- a/meta/recipes-extended/cronie/cronie_1.4.8.bb
+++ b/meta/recipes-extended/cronie/cronie_1.4.8.bb
@@ -18,7 +18,7 @@ DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
18RDEPENDS_${PN} = "${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_DEPS}', '', d)}" 18RDEPENDS_${PN} = "${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_DEPS}', '', d)}"
19PAM_DEPS = "libpam libpam-runtime pam-plugin-access pam-plugin-loginuid" 19PAM_DEPS = "libpam libpam-runtime pam-plugin-access pam-plugin-loginuid"
20 20
21PR = "r1" 21PR = "r2"
22 22
23SRC_URI = "https://fedorahosted.org/releases/c/r/cronie/cronie-${PV}.tar.gz \ 23SRC_URI = "https://fedorahosted.org/releases/c/r/cronie/cronie-${PV}.tar.gz \
24 file://crond.init \ 24 file://crond.init \
@@ -31,7 +31,7 @@ PAM_SRC_URI = "file://crond_pam_config.patch"
31SRC_URI[md5sum] = "9b1d2ce6db8d1883e06635f437170657" 31SRC_URI[md5sum] = "9b1d2ce6db8d1883e06635f437170657"
32SRC_URI[sha256sum] = "a3b910876f255712f1a5c364b74f34b0ceac9f6f3bbc45e854c5722785f513b3" 32SRC_URI[sha256sum] = "a3b910876f255712f1a5c364b74f34b0ceac9f6f3bbc45e854c5722785f513b3"
33 33
34inherit autotools update-rc.d 34inherit autotools update-rc.d useradd
35 35
36EXTRA_OECONF += "\ 36EXTRA_OECONF += "\
37 ${@base_contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)}" 37 ${@base_contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)}"
@@ -39,6 +39,9 @@ EXTRA_OECONF += "\
39INITSCRIPT_NAME = "crond" 39INITSCRIPT_NAME = "crond"
40INITSCRIPT_PARAMS = "start 90 2 3 4 5 . stop 60 0 1 6 ." 40INITSCRIPT_PARAMS = "start 90 2 3 4 5 . stop 60 0 1 6 ."
41 41
42USERADD_PACKAGES = "${PN}"
43GROUPADD_PARAM_${PN} = "crontab"
44
42do_install_append () { 45do_install_append () {
43 install -d ${D}${sysconfdir}/sysconfig/ 46 install -d ${D}${sysconfdir}/sysconfig/
44 install -d ${D}${sysconfdir}/init.d/ 47 install -d ${D}${sysconfdir}/init.d/
@@ -54,25 +57,19 @@ do_install_append () {
54 mkdir -p ${D}${sysconfdir}/cron.weekly 57 mkdir -p ${D}${sysconfdir}/cron.weekly
55 mkdir -p ${D}${sysconfdir}/cron.monthly 58 mkdir -p ${D}${sysconfdir}/cron.monthly
56 touch ${D}${sysconfdir}/cron.deny 59 touch ${D}${sysconfdir}/cron.deny
57} 60
58
59FILES_${PN} += "${sysconfdir}/cron*"
60
61pkg_postinst_${PN} () {
62 if [ "x$D" != "x" ] ; then
63 exit 1
64 fi
65
66 # below setting is necessary to allow normal user using crontab 61 # below setting is necessary to allow normal user using crontab
67 62
68 # add 'crontab' group and setgid for crontab binary 63 # setgid for crontab binary
69 grep crontab /etc/group || addgroup crontab 64 chown root:crontab ${D}/usr/bin/crontab
70 chown root:crontab /usr/bin/crontab 65 chmod 2755 ${D}/usr/bin/crontab
71 chmod 2755 /usr/bin/crontab
72 66
73 # allow 'crontab' group write to /var/spool/cron 67 # allow 'crontab' group write to /var/spool/cron
74 chown root:crontab /var/spool/cron 68 chown root:crontab ${D}/var/spool/cron
75 chmod 770 /var/spool/cron 69 chmod 770 ${D}/var/spool/cron
76 70
77 chmod 600 /etc/crontab 71 chmod 600 ${D}/etc/crontab
78} 72}
73
74FILES_${PN} += "${sysconfdir}/cron*"
75