summaryrefslogtreecommitdiffstats
path: root/tools/bcfg2-cron
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2006-08-03 15:35:50 +0000
committerNarayan Desai <desai@mcs.anl.gov>2006-08-03 15:35:50 +0000
commit902c3519f67eaa7119c02bd78b65bf97f28103be (patch)
tree394d0c589d2471fe5d12ecac0647960165177943 /tools/bcfg2-cron
parent791c0fef838d42b584c87504ba866cafafc74dcb (diff)
downloadbcfg2-902c3519f67eaa7119c02bd78b65bf97f28103be.tar.gz
bcfg2-902c3519f67eaa7119c02bd78b65bf97f28103be.tar.bz2
bcfg2-902c3519f67eaa7119c02bd78b65bf97f28103be.zip
More packaging updates from Ressu
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2038 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'tools/bcfg2-cron')
-rw-r--r--tools/bcfg2-cron11
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/bcfg2-cron b/tools/bcfg2-cron
index 6dfa5db66..d5f6d76fc 100644
--- a/tools/bcfg2-cron
+++ b/tools/bcfg2-cron
@@ -12,6 +12,9 @@ BCFG2_CRON=off
BCFG2_ENABLED=0
# Set default options
+# This script will respect additional variables:
+# BCFG_OPTIONS_DAILY and BCFG_OPTIONS_HOURLY are added to BCFG2_OPTIONS
+# This allows you to run different types of passes with cron
BCFG2_OPTIONS="-q"
# bcfg2 file locations
@@ -27,16 +30,18 @@ BCFG2_CFG=/etc/bcfg2.conf
invoke_bcfg2 () {
# Invoke bcfg2 if enabled
if [ ${BCFG2_ENABLED} -eq 1 ]; then
- ${BCFG2_BIN} ${BCFG2_OPTIONS}
+ ${BCFG2_BIN} ${BCFG2_OPTIONS} ${BCFG2_OPTIONS_${RUNTYPE}}
fi
}
case $1 in
"--daily")
- [ "x${BCFG2_CRON}" = "xdaily" ] && invoke_bcfg2
+ [ "x${BCFG2_CRON}" = "xdaily" -o "x${BCFG2_CRON}" = "xboth" ] && \
+ RUNTYPE=DAILY invoke_bcfg2
;;
"--hourly")
- [ "x${BCFG2_CRON}" = "xhourly" ] && invoke_bcfg2
+ [ "x${BCFG2_CRON}" = "xhourly" -o "x${BCFG2_CRON}" = "xboth"] && \
+ RUNTYPE=HOURLY invoke_bcfg2
;;
*)
echo "Usage: $0 [--daily|--hourly]"