Module: check_mk
Branch: master
Commit: 9d57338da3fb4da5d5ce49035f790c0d1de3fbff
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9d57338da3fb4d…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Jul 2 10:40:09 2018 +0200
6286 FIX crontab init script: Fixed implicit dependency to "which" command
---
.werks/6286 | 10 ++++++++++
omd/packages/maintenance/skel/etc/init.d/crontab | 7 +++----
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/.werks/6286 b/.werks/6286
new file mode 100644
index 0000000..ee476f3
--- /dev/null
+++ b/.werks/6286
@@ -0,0 +1,10 @@
+Title: crontab init script: Fixed implicit dependency to "which" command
+Level: 1
+Component: omd
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1530520789
+Class: fix
+
+
diff --git a/omd/packages/maintenance/skel/etc/init.d/crontab
b/omd/packages/maintenance/skel/etc/init.d/crontab
index 0cce5b1..e224710 100644
--- a/omd/packages/maintenance/skel/etc/init.d/crontab
+++ b/omd/packages/maintenance/skel/etc/init.d/crontab
@@ -6,7 +6,6 @@
NAME="crontab"
MERGECRONTABS="###ROOT###/bin/merge-crontabs"
CROND="###ROOT###/etc/cron.d/*"
-CRONTAB=`which crontab`
CRONTAB_OPTS=""
USER="###SITE###"
@@ -21,7 +20,7 @@ case "$1" in
start)
echo -en "Initializing Crontab..."
- ${MERGECRONTABS} ${CROND} | $CRONTAB $CRONTAB_OPTS - > /dev/null
+ ${MERGECRONTABS} ${CROND} | crontab $CRONTAB_OPTS - > /dev/null
if [ $? -eq 0 ]; then
echo "OK"
exit 0
@@ -33,7 +32,7 @@ case "$1" in
stop)
echo -n "Removing Crontab..."
- $CRONTAB $CRONTAB_OPTS -r || exit 0
+ crontab $CRONTAB_OPTS -r || exit 0
echo OK
exit 0
;;
@@ -43,7 +42,7 @@ case "$1" in
$0 start
;;
status)
- $CRONTAB $CRONTAB_OPTS -l >/dev/null 2>&1
+ crontab $CRONTAB_OPTS -l >/dev/null 2>&1
if [ $? -eq 0 ]; then
echo "crontab initialized"
exit 0