Date: Thu, 09 May 2013 18:08:55 +0200 From: Florent Peterschmitt <florent@peterschmitt.fr> To: FreeBSD Mailing List <freebsd-ports@freebsd.org> Subject: mail/postfix - automated install : bypass default mailer message Message-ID: <518BCA17.7010601@peterschmitt.fr>
next in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2TQGAFIVWQVCRULNWEHEL Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, In pkg-install.in it's said if POSTFIX_DEFAULT_MTA=3DYES then postfix wil= l be set as default mailer in /etc/mail/mailer.conf So, I do export POSTFIX_DEFAULT_MTA=3DYES but the only thing it does is setting the default answer to yes. So is it possible to make the installation fully automated, without any ask ? Should we do yes | pkg install postfix ? I think it should be possible to have a non-interactive installation, via an environment variable. This *should* work: --- pkg-install.in 2013-05-09 18:01:41.802404861 +0200 +++ pkg-install.in 2013-05-09 18:06:04.858404947 +0200 @@ -83,7 +83,13 @@ egrep -q "^newaliases.*${PREFIX}/sbin/sendmail" ${MC} ret=3D$? if [ ${ret} -ne 0 ]; then - if yesno "Would you like to activate Postfix in ${MC}" ${DEFAULT_REPLACE_MAILERCONF}; then + local postfix_ret + if [ -z ${POSTFIX_DEFAULT_MTA_FORCE} ]; then + postfix_ret=3D$(yesno "Would you like to activate= Postfix in ${MC}" ${DEFAULT_REPLACE_MAILERCONF}) + else + postfix_ret=3D0 + fi + if ${postfix_ret}; then /bin/mv -f ${MC} ${MC}.old echo "#" > ${MC} echo -n "# Execute the Postfix sendmail program" >> ${MC} --=20 Florent Peterschmitt +33 (0)6 64 33 97 92 florent@peterschmitt.fr ------------------------ O< ascii ribbon campaign - stop html mail - www.asciiribbon.org ------enig2TQGAFIVWQVCRULNWEHEL Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJRi8ocAAoJEMtO2Sol0IImEMIIAIS9jVbacKiZLD1HisZmdP5C aPtAGxI2zhOCjIYrdcir/mELNJmnkKMiACyTZPtWEqUNq0KJrS12AJ5Kj2jbstbF 00dImHgfqk/vgcKMWCDMsMdN0d0Rw4LYe30Me4XfhXymRQ/saP5PAcWOxW64J5a5 kxsEzXoxhK1Fwczr0hG8V+KMPTJZaiM+3O/0SwPbPh2WhMtBwV3fc90jhj/JcQKi PlsSODNiYOP3aaUquy/W6WmpfhWXN7Fk+AyzFeVK4AEG1KpYKkbBe/ZfZmBkM9im RnaDRmrw77OWiHkGv8Van33ScHKTVgF9RQ9hq0t/6qHHVMFTd0mx14mHnyusbO0= =uuNW -----END PGP SIGNATURE----- ------enig2TQGAFIVWQVCRULNWEHEL--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?518BCA17.7010601>