[28350] in Source-Commits

home help back first fref pref prev next nref lref last post

scripts commit: Prompt for debathena-msmtp-mta

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Fri Jul 25 13:03:25 2014

Date: Fri, 25 Jul 2014 13:03:17 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201407251703.s6PH3He1015416@drugstore.mit.edu>
To: source-commits@MIT.EDU

https://github.com/mit-athena/scripts/commit/8a87dc59d489c42fbc602baff1117f3b8030cf32
commit 8a87dc59d489c42fbc602baff1117f3b8030cf32
Author: Jonathan Reed <jdreed@mit.edu>
Date:   Fri Jul 25 10:09:17 2014 -0400

    Prompt for debathena-msmtp-mta
    
    Ask the user whether or not to install debathena-msmtp-mta,
    defaulting to 'yes' for workstation and forcing 'yes' on
    cluster.  (Trac: #1025)

 installer/install-debathena.beta.sh |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/installer/install-debathena.beta.sh b/installer/install-debathena.beta.sh
index 87e9104..9f7becb 100644
--- a/installer/install-debathena.beta.sh
+++ b/installer/install-debathena.beta.sh
@@ -174,6 +174,29 @@ mainpackage=debathena-$category
 csoft=no
 tsoft=no
 resolvconfhack=no
+msmtpmta=no
+
+if [ cluster = "$category" ]; then
+  msmtpmta=yes
+else
+  echo "Debathena provides the 'debathena-msmtp-mta' package, which includes"
+  echo "a wrapper for the 'sendmail' command that configures it to use the"
+  echo "MIT outgoing servers and Kerberos authentication."
+  echo "Advanced users may wish to skip this package and configure their own"
+  echo "mail transport agent (e.g. Postfix) instead."
+  echo
+  maildefault=n
+  mailprompt="[y/N]"
+  if [ workstation = "$category" ] ; then
+    maildefault=y
+    mailprompt="[Y/n]"
+  fi
+  ask "Install debathena-msmtp-mta? $mailprompt" $maildefault
+  if [ y = "$answer" ]; then
+    msmtpmta=yes
+  fi
+fi
+
 echo "The extra-software package installs a standard set of software"
 echo "determined to be of interest to MIT users, such as LaTeX.  It is pretty"
 echo "big (several gigabytes, possibly more)."
@@ -312,6 +335,7 @@ fi
 # so also set some sane defaults
 cat <<EOF | debconf-set-selections
 # Set sane defaults
+postfix	postfix/main_mailer_type	select	Internet Site
 openafs-client  openafs-client/thiscell string grand.central.org
 openafs-client  openafs-client/cachesize string 150000
 cyrus-common	cyrus-common/removespools	boolean	false
@@ -539,6 +563,11 @@ if [ yes = "$tsoft" ]; then
   DEBIAN_PRIORITY=critical $aptitude -y install debathena-thirdparty
 fi
 
+if [ yes = "$msmtpmta" ]; then
+  output "Installing debathena-msmtp-mta"
+  DEBIAN_PRIORITY=critical $aptitude -y install debathena-msmtp-mta
+fi
+
 # Post-install cleanup for cluster systems.
 if [ "$divertedbg" = "yes" ]; then
     rm -f $bgimage

home help back first fref pref prev next nref lref last post