Yair Zaslavsky has uploaded a new change for review. Change subject: tools: Moving of MAIL_SERVER : trimming ......................................................................
tools: Moving of MAIL_SERVER : trimming The following patch performs two things: a. Moves the trimming of : above the check if the length is zero (we should check if the length if zero for the content of MAIL_SERVER set by the user who configured the utility, and not to the string with : at the end) b. Removes nslookup - nslookup may pass in some occassions, and still the mail server will not be valid for example, mail server is down). Change-Id: Ifc56789ded0fbc1e28bd285eb5bc1ec6883433e8 Bug-Url: https://bugzilla.redhat.com/921405 Signed-off-by: Yair Zaslavsky <yzasl...@redhat.com> --- M backend/manager/tools/src/main/shell/engine-notifier.sh 1 file changed, 2 insertions(+), 8 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/30/14130/1 diff --git a/backend/manager/tools/src/main/shell/engine-notifier.sh b/backend/manager/tools/src/main/shell/engine-notifier.sh index 6cdc9ea..51982d2 100755 --- a/backend/manager/tools/src/main/shell/engine-notifier.sh +++ b/backend/manager/tools/src/main/shell/engine-notifier.sh @@ -79,18 +79,12 @@ # a) properties are defined # b) when properties are defined and reference a file system resource, that the resource exists. +# Remove possible : at the end of the MAIL_SERVER address +MAIL_SERVER=`echo $MAIL_SERVER | cut -d ':' -f 1` # MAIL_SERVER is required! if [ -z "$MAIL_SERVER" ]; then die "Error: \$MAIL_SERVER is not defined, please check for this in configuration file $CONF_FILE\n" 6 fi - -# Remove possible : at the end of the MAIL_SERVER address -MAIL_SERVER=`echo $MAIL_SERVER | cut -d ':' -f 1` -nslookup $MAIL_SERVER &>/dev/null -if [ $? -ne 0 ] ; then - die "Error: \$MAIL_SERVER ($MAIL_SERVER) must contain resolvable address" -fi - # Now check for properties that if defined, can not be empty # INTERVAL_IN_SECONDS if defined can not be empty -- To view, visit http://gerrit.ovirt.org/14130 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifc56789ded0fbc1e28bd285eb5bc1ec6883433e8 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yair Zaslavsky <yzasl...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches