From 902c3519f67eaa7119c02bd78b65bf97f28103be Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Thu, 3 Aug 2006 15:35:50 +0000 Subject: More packaging updates from Ressu git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2038 ce84e21b-d406-0410-9b95-82705330c041 --- tools/bcfg2-cron | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'tools') 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]" -- cgit v1.2.3-1-g7c22