-# test validity if called without -o
-if [ "${UPEX4C_outputfile}" = "${UPEX4C_autoconfigfile}" ] && \
- [ -x "${EXIM}" ] ; then
- if ! "${EXIM}" -C "${UPEX4C_outputfile}.tmp" -bV > /dev/null ; then
- # we have an error in the configuration file. Do not install
- # and activate. However, errors in string expansions inside
- # the configuration file are not detected by this check!
- errormessage "Invalid new configfile ${UPEX4C_outputfile}.tmp, not installing ${UPEX4C_outputfile}.tmp to ${UPEX4C_outputfile}"
- exit 1
+# test validity if called without -o or if --check was supplied
+if [ "${UPEX4C_outputfile}" = "${UPEX4C_autoconfigfile}" ] || \
+ [ "x${UPEX4C_check}" = "xyes" ]; then
+ if [ -x "${EXIM}" ] ; then
+ if ! "${EXIM}" -C "${UPEX4C_tmp}" -bV > /dev/null ; then
+ # we have an error in the configuration file. Do not install
+ # and activate. However, errors in string expansions inside
+ # the configuration file are not detected by this check!
+ errormessage "Invalid new configfile ${UPEX4C_tmp}, not installing ${UPEX4C_tmp} to ${UPEX4C_outputfile}"
+ exit 1
+ fi