AMI building AMI

Rafal Lukawiecki raf at rafal.net
Tue Jan 2 20:48:19 UTC 2018


I have encountered another, hopefully minor issue running pkg in the unattended script. When it installs a package (postfix-sasl) it expects keyboard input to “Would you like to active Postfix in /usr/local/etc/mail/mailer.conf [n]?”. I have tried both:

export ASSUME_ALWAYS_YES=YES
pkg -c /mnt -o ASSUME_ALWAYS_YES=YES install $PKGS_TO_INSTALL

but the process still hangs waiting for input. Are there any other flags or tricks I could pass to pkg, short of prefixing it with “yes n |”? Looking through man for pkg I do not see any options designed for such unattended install cases.

Many thanks for your help.

Rafal



More information about the freebsd-cloud mailing list