I'd like to know how to use the results of debconf-show with debconf-set-selections to pre-configure 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 dialogs 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?