summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2016-01-27 11:57:23 +0100
committerSimon Rettberg2016-01-27 11:57:23 +0100
commitf88956297a9f4faa7a668693bb359a61b0737197 (patch)
tree7d9d80376ee85f07af3975a43190835e30947c27
parentMerge branch 'master' of git.openslx.org:openslx-ng/tm-scripts (diff)
downloadtm-scripts-f88956297a9f4faa7a668693bb359a61b0737197.tar.gz
tm-scripts-f88956297a9f4faa7a668693bb359a61b0737197.tar.xz
tm-scripts-f88956297a9f4faa7a668693bb359a61b0737197.zip
[cron] Switch to cronie
-rw-r--r--remote/modules/cron/data/etc/systemd/system/cron.service9
-rw-r--r--remote/modules/cron/module.build22
-rw-r--r--remote/modules/cron/module.conf4
3 files changed, 21 insertions, 14 deletions
diff --git a/remote/modules/cron/data/etc/systemd/system/cron.service b/remote/modules/cron/data/etc/systemd/system/cron.service
index cd8a41a9..d2c09ebb 100644
--- a/remote/modules/cron/data/etc/systemd/system/cron.service
+++ b/remote/modules/cron/data/etc/systemd/system/cron.service
@@ -1,7 +1,10 @@
[Unit]
-Description=Cron Daemon
+Description=Cron Daemon (cronie)
+After=auditd.service nss-user-lookup.target systemd-user-sessions.service time-sync.target ypbind.service
[Service]
-ExecStart=/opt/openslx/sbin/cron -n
-ExecStartPost=-/bin/sh -c 'sleep 3; touch -c /etc/cron.d /etc/cron.d/*'
+ExecStart=/opt/openslx/sbin/crond -n
Restart=on-failure
+ExecReload=/opt/openslx/bin/kill -HUP $MAINPID
+KillMode=process
+
diff --git a/remote/modules/cron/module.build b/remote/modules/cron/module.build
index 932c3e85..cf696ea0 100644
--- a/remote/modules/cron/module.build
+++ b/remote/modules/cron/module.build
@@ -2,24 +2,26 @@
fetch_source() {
-
- # use our own patched source
- local TARBALL="vixie-cron-4.1-openslx.tgz"
- [ ! -e "${TARBALL}" ] && perror "${TARBALL} not found under ${MODULE_DIR}."
-
- mkdir "${MODULE_DIR}/src" || perror "Could not create ${MODULE_DIR}/src"
- tar xfz "${TARBALL}" -C "${MODULE_DIR}/src" || perror "Could not extract ${TARBALL} to ${MODULE_DIR}/src"
+ [ -d "${MODULE_DIR}/src/.git" ] && return 0
+ rm -rf -- "${MODULE_DIR}/src"
+ git clone --depth 1 "${REQUIRED_GIT}" "${MODULE_DIR}/src" || perror "Could not create ${MODULE_DIR}/src"
+ cd "${MODULE_DIR}/src"
+ git checkout "${REQUIRED_COMMIT}" || perror "Could not switch to required commit"
+ cd -
}
build() {
# compilation
cd "${MODULE_DIR}/src" || perror "Could not cd to '${MODULE_DIR}/src'. Did fetch_source work?"
- make cron || perror "Could not compile cron using 'make'."
+ ./autogen.sh || perror "Autogen failed"
+ ./configure --disable-dependency-tracking --enable-syscrontab --prefix= --exec-prefix= --bindir=/opt/openslx/bin --sbindir=/opt/openslx/sbin || perror "configure failed"
+
+ make || perror "Could not compile cron using 'make'."
- # copy to build dir, since there are no shared libs linked in
+ # NO MAKE INSTALL: Copy to build dir, since there are no shared libs linked in
mkdir -p "${MODULE_BUILD_DIR}/opt/openslx/sbin"
- cp "${MODULE_DIR}/src/cron" "${MODULE_BUILD_DIR}/opt/openslx/sbin/" || perror "Could copy cron binary to ${MODULE_BUILD_DIR}"
+ cp "${MODULE_DIR}/src/crond" "${MODULE_BUILD_DIR}/opt/openslx/sbin/" || perror "Could copy crond binary to ${MODULE_BUILD_DIR}"
cd - &>/dev/null
}
diff --git a/remote/modules/cron/module.conf b/remote/modules/cron/module.conf
index 8ecca658..60d5555d 100644
--- a/remote/modules/cron/module.conf
+++ b/remote/modules/cron/module.conf
@@ -1,3 +1,5 @@
+REQUIRED_GIT="http://git.fedorahosted.org/git/cronie.git"
+REQUIRED_COMMIT="bab45f0b817d8829f2423e033d90974c9a3abc20"
REQUIRED_BINARIES="
- cron
+ crond
"