Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jul 2022 15:00:03 GMT
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 7de4b07516bf - main - mail/postfix: remove interractive part of the script
Message-ID:  <202207271500.26RF03IU008446@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by bapt:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7de4b07516bfce49ce4dd9352bdddcc6ddec6ef7

commit 7de4b07516bfce49ce4dd9352bdddcc6ddec6ef7
Author:     Baptiste Daroussin <bapt@FreeBSD.org>
AuthorDate: 2022-07-27 14:56:52 +0000
Commit:     Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2022-07-27 14:59:48 +0000

    mail/postfix: remove interractive part of the script
    
    pkg does not allow interractive script
---
 mail/postfix/Makefile             |  2 +-
 mail/postfix/files/pkg-install.in | 37 +------------------------------------
 2 files changed, 2 insertions(+), 37 deletions(-)

diff --git a/mail/postfix/Makefile b/mail/postfix/Makefile
index a4a357e08401..b4bfeeb1e26c 100644
--- a/mail/postfix/Makefile
+++ b/mail/postfix/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	postfix
 DISTVERSION=	3.7.2
-PORTREVISION?=	0
+PORTREVISION?=	1
 PORTEPOCH=	1
 CATEGORIES=	mail
 MASTER_SITES=	http://ftp.porcupine.org/mirrors/postfix-release/ \
diff --git a/mail/postfix/files/pkg-install.in b/mail/postfix/files/pkg-install.in
index 340c1df561e7..f4e07fb3759c 100644
--- a/mail/postfix/files/pkg-install.in
+++ b/mail/postfix/files/pkg-install.in
@@ -28,35 +28,6 @@ else
       DEFAULT_REPLACE_MAILERCONF=y
 fi
 
-ask() {
-      local question default answer
-
-      question=$1
-      default=$2
-      if [ -z "${PACKAGE_BUILDING}" -a "${BATCH}" = "no" ]; then
-	      read -p "${question} [${default}]? " answer
-      fi
-      if [ -z "${answer}" ]; then
-	      answer=${default}
-      fi
-      echo ${answer}
-}
-
-yesno() {
-      local question default answer
-
-      question=$1
-      default=$2
-      while :; do
-	      answer=$(ask "${question}" "${default}")
-	      case "${answer}" in
-		      [Yy]*)	return 0;;
-		      [Nn]*)	return 1;;
-	      esac
-	      echo "Please answer yes or no."
-      done
-}
-
 # ==============================================================================
 # Respect POSTFIX_DEFAULT_MTA, do not ask for confirmation!
 # (This helps tools like salt, ansible or puppet on new installations)
@@ -67,13 +38,7 @@ install_choice(){
 
 	if [ "${DEFAULT_REPLACE_MAILERCONF}" = "y" ]; then
 		install_mailer_conf ${mailerconf}
-	elif [ "${DEFAULT_REPLACE_MAILERCONF}" = "n" -a -t 0 ]; then
-		if yesno "Would you like to activate Postfix in ${mailerconf}" ${DEFAULT_REPLACE_MAILERCONF:="n"}; then
-			install_mailer_conf ${mailerconf}
-		else
-			show_not_activated_msg ${mailerconf}
-		fi
-	else
+	elif [ "${DEFAULT_REPLACE_MAILERCONF}" = "n" ]; then
 		show_not_activated_msg ${mailerconf}
 	fi
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207271500.26RF03IU008446>