Skipping or pre-setting the options in a package installation? (bsdstats)

A.J. Kehoe IV (Nanoman) nanoman at nanoman.ca
Mon Feb 2 20:14:46 UTC 2015


Matthew Pherigo wrote:
>Hi all,
>
>I use Ansible to administrate FreeBSD machines, and every time I install a pkg(8) that prompts for options (like bsdstats, which asks some simple yes/no questions), the install stops and waits for input that will never arrive. Though I'm sure that something can be improved about how Ansible handles this situation, I'm wondering how this can be automated or skipped in the first place. Perhaps there's an environment variable like $ALWAYS_ASSUME_YES that chooses the defaults that come with the package automatically?
>
>Thanks,
>--Matt

In the case of BSDstats, you can install it with the default answers selected automatically by setting the environmental variable BATCH to "yes".  To change the default answers, there are environmental variables that you can use:

-----BEGIN QUOTE-----
# The default answer to each of the installation questions is "yes".  You can
# override a questions's default by setting its environment variable to "no".
#
# Environment Variable      | Question
# --------------------------+------------------------------------------------------------------
# BSDSTATS_MONTHLY_ENABLE   | Would you like to enable monthly reporting in /etc/periodic.conf?
# BSDSTATS_MONTHLY_DEVICES  | Would you like to send a list of installed hardware as well?
# BSDSTATS_MONTHLY_PORTS    | Would you like to send a list of installed ports as well?
# BSDSTATS_MONTHLY_NOW      | Would you like to run it now?
# BSDSTATS_REBOOT_REPORTING | Would you like to enable reporting on bootup in /etc/rc.conf?
-----END QUOTE-----

http://svnweb.freebsd.org/ports/head/sysutils/bsdstats/pkg-install?view=markup

-- 
A.J. Kehoe IV (Nanoman)     |  /"\  ASCII Ribbon Campaign
Nanoman's Company           |  \ /   - No HTML/RTF in E-mail
E-mail: nanoman at nanoman.ca  |   X    - No proprietary attachments
WWW: http://www.nanoman.ca/ |  / \   - Respect for open standards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3924 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20150202/751648bf/attachment.bin>


More information about the freebsd-questions mailing list