lamw/ghettoVCB — pull request #8 by fryrpc (2013-01-08 13:01:41+00:00)
Title: Updated useDefaultConfigurations to maintain configuration

When using the -a and -c command line option I found that emails were not being sent and this was because EMAIL_LOG was being reset to = 0 rather than maintaining the value read from the global configuration.

I think the problem was highlighted as a -a does all VM's and -c specifies the directory to look into for customer VM backup configuration. Because the -c lookup failed, due to all VM's being specified with -a, then the useDefaultConfigurations was called which was hardcoded to set email_log to disabled.

if [[ -e "${CONFIG_DIR}/${VM}" ]]; then
logger "info" "CONFIG - USING CONFIGURATION FILE = ${CONFIG_DIR}/${VM}"
source "${CONFIG_DIR}/${VM}"
else
useDefaultConfigurations

useDefaultConfigurations() {
EMAIL_LOG=0

I think the changes in this commit addresses this as the new parameter values appeared to be hardcoded, when the useDefaultConfigurations was called, rather than honoured from the global config file or the default values set at the top of the .sh file.