summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2013-12-05 15:21:06 +0100
committerJonathan Bauer2013-12-05 15:21:06 +0100
commit0e0be33296a5174e5463c3bb0ab264b3b54a14f5 (patch)
tree1389480282a9c5364700912771b274be05dff12c
parent[pam] check if pam_script_ses_open is actually being called by root (diff)
downloadtm-scripts-0e0be33296a5174e5463c3bb0ab264b3b54a14f5.tar.gz
tm-scripts-0e0be33296a5174e5463c3bb0ab264b3b54a14f5.tar.xz
tm-scripts-0e0be33296a5174e5463c3bb0ab264b3b54a14f5.zip
[cron] new module for cron using our own patched sources. Has
/etc/cron.d support, files there need to have 0600 permissions to run!
-rw-r--r--remote/modules/cron/cron.build30
-rw-r--r--remote/modules/cron/cron.conf3
l---------remote/modules/cron/data/etc/systemd/system/basic.target.wants/cron.service1
-rw-r--r--remote/modules/cron/data/etc/systemd/system/cron.service7
-rw-r--r--remote/modules/cron/vixie-cron-4.1-crondir-support.tgzbin0 -> 64530 bytes
l---------remote/targets/stage32/cron1
6 files changed, 42 insertions, 0 deletions
diff --git a/remote/modules/cron/cron.build b/remote/modules/cron/cron.build
new file mode 100644
index 00000000..2f18b138
--- /dev/null
+++ b/remote/modules/cron/cron.build
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+
+fetch_source() {
+
+ # use our own patched source
+ local TARBALL="vixie-cron-4.1-crondir-support.tgz"
+ [ ! -e "${TARBALL}" ] && perror "${TARBALL} not found under ${MODULE_DIR}."
+
+ mkdir "${MODULE_DIR}/src" || perror "Could not create ${MODULE_DIR}/src"
+ tar xvfz "${TARBALL}" -C "${MODULE_DIR}/src" || perror "Could not extract ${TARBALL} to ${MODULE_DIR}/src"
+}
+
+build() {
+
+ # compilation
+ cd "${MODULE_DIR}/src" || perror "Could not cd to '${MODULE_DIR}/src'. Did fetch_source work?"
+ make || perror "Could not compile cron using 'make'."
+
+ # installation
+ mkdir -p "${MODULE_BUILD_DIR}"/{usr/bin,usr/sbin}
+ DESTDIR="${MODULE_BUILD_DIR}" make install || perror "Could not 'make install' to ${MODULE_BUILD_DIR}"
+
+ cd - &>/dev/null
+}
+
+post_copy() {
+ :
+}
+
diff --git a/remote/modules/cron/cron.conf b/remote/modules/cron/cron.conf
new file mode 100644
index 00000000..8ecca658
--- /dev/null
+++ b/remote/modules/cron/cron.conf
@@ -0,0 +1,3 @@
+REQUIRED_BINARIES="
+ cron
+"
diff --git a/remote/modules/cron/data/etc/systemd/system/basic.target.wants/cron.service b/remote/modules/cron/data/etc/systemd/system/basic.target.wants/cron.service
new file mode 120000
index 00000000..8c1084c3
--- /dev/null
+++ b/remote/modules/cron/data/etc/systemd/system/basic.target.wants/cron.service
@@ -0,0 +1 @@
+../cron.service \ No newline at end of file
diff --git a/remote/modules/cron/data/etc/systemd/system/cron.service b/remote/modules/cron/data/etc/systemd/system/cron.service
new file mode 100644
index 00000000..2c5b832a
--- /dev/null
+++ b/remote/modules/cron/data/etc/systemd/system/cron.service
@@ -0,0 +1,7 @@
+[Unit]
+Description=CRON
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/cron
+ExecStop=/opt/openslx/bin/kill -TERM $MAINPID
diff --git a/remote/modules/cron/vixie-cron-4.1-crondir-support.tgz b/remote/modules/cron/vixie-cron-4.1-crondir-support.tgz
new file mode 100644
index 00000000..0c6e1101
--- /dev/null
+++ b/remote/modules/cron/vixie-cron-4.1-crondir-support.tgz
Binary files differ
diff --git a/remote/targets/stage32/cron b/remote/targets/stage32/cron
new file mode 120000
index 00000000..39164da5
--- /dev/null
+++ b/remote/targets/stage32/cron
@@ -0,0 +1 @@
+../../modules/cron \ No newline at end of file