Linux Commands Examples

A great documentation place for Linux commands

debconf-set-selections

insert new default values into the debconf database

Synopsis

 debconf-set-selections file
 debconf-get-selections | ssh newhost debconf-set-selections

add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!

examples

0
 # Force debconf priority to critical.
 debconf debconf/priority select critical
 # Override default frontend to readline, but allow user to select.
 debconf debconf/frontend select readline
 debconf debconf/frontend seen false

0
source
            
sudo debconf-set-selections <<< 'tempsqlpw'
sudo debconf-set-selections <<< 'tempsqlpw'
sudo apt-get -y install mysql-server

description

debconf-set-selections can be used to pre-seed the debconf database with answers, or to change answers in the database. Each question will be marked as seen to prevent debconf from asking the question interactively.

Reads from a file if a filename is given, otherwise from stdin.

options

--verbose, -v

verbose output

--checkonly, -c

only check the input file format, do not save changes to database

data format

The data is a series of lines. Lines beginning with a # character are comments. Blank lines are ignored. All other lines set the value of one question, and should contain four values, each separated by one character of whitespace. The first value is the name of the package that owns the question. The second is the name of the question, the third value is the type of this question, and the fourth value (through the end of the line) is the value to use for the answer of the question.

Alternatively, the third value can be "seen"; then the preseed line only controls whether the question is marked as seen in debconf’s database. Note that preseeding a question’s value defaults to marking that question as seen, so to override the default value without marking a question seen, you need two lines.

Lines can be continued to the next line by ending them with a "\" character.

warning

Only use this command to seed debconf values for packages that will be or are installed. Otherwise you can end up with values in the database for uninstalled packages that will not go away, or with worse problems involving shared values. It is recommended that this only be used to seed the database if the originating machine has an identical install.


see also

debconf-get-selections (available in the debconf-utils package)


author

Petter Reinholdtsen <pere[:at:]hungry[:dot:]com>

How can this site be more helpful to YOU ?


give  feedback