I'd like to know in common how to use the results of debconf-show with debconf set selections to precvonfigure deb packages with the command line or within a shell script
For example
If I use
sudo debconf-get-selections | grep java7 > result;cat result
I get the following
oracle-java7-installer shared/present-oracle-license-v1-1 note
oracle-java7-installer oracle-java7-installer/local string
oracle-java7-installer shared/accepted-oracle-license-v1-1 boolean true
oracle-java7-installer shared/error-oracle-license-v1-1 error
oracle-java7-installer oracle-java7-installer/not_exist error
How would the right debconf set selections line look like to configure the two dialoges that appear trough the installation?
In general how is the right syntax of debconf set selections I assume there are not only booleans like true or false and yes or no
I guess there is much more an other example will be how to select the default desktop manager if lightdm and gdm installed by a bash script.
Is there a general proofed approach to determine and the right values for a debconf package and write a proper bash script that installs something like the webupt8 java package and preselect the values that the user normally would be asked for?
You need to use pre-seeding. The
debconf-set-selections
command presets answers asked by debconf before installing the package.E.G.
Then install the package.
Debconf accepts only a restricted set of possible type values, for instance,
boolean
,string
,note
,select
, and others, and it's very peaky about it.In your question, I assume you want to automate the Java license debconf value, so you may run something like this:
If you need to add a string value, run something like this:
If you need a select value you may run: