From 0903c4bdc269c9116dfdb8cedefc7d255ed664ef Mon Sep 17 00:00:00 2001 From: Shawn Iverson Date: Fri, 29 Sep 2017 22:01:13 -0400 Subject: [PATCH] Return result of mta install --- debian/install.sh | 4 ++++ rhel/install.sh | 4 ++++ suse/install.sh | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/debian/install.sh b/debian/install.sh index 9d2dab7..31d85d5 100644 --- a/debian/install.sh +++ b/debian/install.sh @@ -449,6 +449,10 @@ done # install this separate in case it conflicts if [ "x$MTAOPTION" != "x" ]; then $APTGET -yf install $MTAOPTION + if [ $? != 0 ]; then + echo "Error installing $MTAOPTION MTA" + echo "This usually means an MTA is already installed." + fi fi # fix the stupid line in /etc/freshclam.conf that disables freshclam diff --git a/rhel/install.sh b/rhel/install.sh index e4478f4..ee8db0c 100644 --- a/rhel/install.sh +++ b/rhel/install.sh @@ -696,6 +696,10 @@ $YUM -y --skip-broken install $BASEPACKAGES $EPELOPTION # install this separate in case it conflicts if [ "x$MTAOPTION" != "x" ]; then $YUM -y install $MTAOPTION + if [ $? != 0 ]; then + echo "Error installing $MTAOPTION MTA" + echo "This usually means an MTA is already installed." + fi if [ $MTAOPTION = "sendmail" ]; then mkdir -p /var/spool/mqueue.in fi diff --git a/suse/install.sh b/suse/install.sh index 19dee49..91a0801 100644 --- a/suse/install.sh +++ b/suse/install.sh @@ -449,6 +449,10 @@ $ZYPPER --non-interactive --ignore-unknown install $BASEPACKAGES # install this separate in case it conflicts if [ "x$MTAOPTION" != "x" ]; then $ZYPPER --non-interactive --ignore-unknown install $MTAOPTION + if [ $? != 0 ]; then + echo "Error installing $MTAOPTION MTA" + echo "This usually means an MTA is already installed." + fi if [ $MTAOPTION = "sendmail" ]; then mkdir -p /var/spool/mqueue mkdir -p /var/spool/mqueue.in