Bug 213132

Summary: Bypass mailer.conf activation prompt when installing mail/postfix non-interactively
Product: Ports & Packages Reporter: xenophon+fbsdports
Component: Individual Port(s)Assignee: Olli Hauer <ohauer>
Status: Closed Feedback Timeout    
Severity: Affects Some People CC: jhujhiti, tw109363
Priority: --- Flags: bugzilla: maintainer-feedback? (ohauer)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch to mail/postfix/files/pkg-install.in adding the "-t 0" test to the ask() function none

Description xenophon+fbsdports 2016-09-30 23:43:11 UTC
Created attachment 175324 [details]
Patch to mail/postfix/files/pkg-install.in adding the "-t 0" test to the ask() function

I'm having some trouble automating the deployment of Postfix on FreeBSD, and it comes down to the mailer.conf activation prompt in the pkg-install script.  The behavior I want is for pkg-install to check whether standard input is open and connected to a terminal, a la the "-t 0" argument to /bin/test.  If standard input is not connected to a terminal, then the "ask()" function in the script should return the default value.  This makes it possible to install Postfix non-interactively.  The attached patch implements this behavior, and I've tested both cases, when stdin is a terminal and when it is not.
Comment 1 tw109363 2020-10-12 01:51:28 UTC
MARKED AS SPAM