Solved Install-Script auto select options

Hello,

I
want to write an installation script that install apache for example.
But I don't want to select the options all the time.
Is there a way to put this in the script? So the script selects the options for me?
 
You can set the options in /var/db/ports/<portname>/options. Just copy the file to this place or echo it in before you start building.
 
Hi,
Thanks for your answer.
Is the only thing I must do to change UNSET to SET ?
 
Basically yes. But the file will only be there if the port has configuration options and after you run make config for the port.


So if you want to completely automate this it's probably easier to just dump a pre created options file.
 
This is how I do it using make.conf(1):

Code:
OPTIONS_UNSET= X11
WITH_OPENSSL_PORT=yes

# ports-mgmt/poudriere-devel
ports-mgmt_poudriere-devel_SET= ZSH

# editors/vim
editors_vim_SET= CONSOLE
editors_vim_UNSET= RUBY TCL ATHENA GNOME GTK2 MOTIF

# sysutils/vimpager
sysutils_vimpager_UNSET= VIMCAT

# mail/mutt
mail_mutt_UNSET= SASL DOCS XML

# ftp/curl
ftp_curl_SET= GSSAPI_NONE
ftp_curl_UNSET= GSSAPI_BASE GSSAPI_HEIMDAL GSSAPI_MIT

In addition I either use ports-mgmt/synth to build the ports or in the case I test something manually with I have BATCH=1 set in /etc/make.conf to prevent options dialogs and to prevent any options from being saved.
 
Back
Top