debconf has a file at /var/cache/debconf/config.dat that contains answers to configuration questions. For example,

Name: libpam-runtime/profiles
Template: libpam-runtime/profiles
Value: unix, systemd
Owners: libpam-runtime
 profile_names = mkhomedir, unix, systemd
 profiles = activate mkhomedir, Unix authentication, Register user sessions in the systemd control group hierarchy

What are Name and Template and why do they always seem to be the same? Value and Owners seem clear enough. Most of all, what is the Variables part for? I thought the whole stanza was describing a variable.

| improve this question | | | | |

Technically, that stanza is describing a Question, in debconf terminology.

As for Template, from the doc text of the corresponding Perl module:

When a new template is created, a question is created with the same name as the template. This is to ensure that the template has at least one owner -- the question, and to make life easier for debconf users -- so they don't have to manually register that question.

The owner field, then, is actually used to set the owner of the question.

It's likely that most users of debconf didn't need to create additional questions based on the same template.

To understand the Variables part, you need to look up the corresponding template. In this case, profiles is a list of choices (see /var/cache/debconf/templates.dat):

Name: libpam-runtime/profiles
Choices: ${profiles}
Choices-c: ${profile_names}
Description: PAM profiles to enable:

And from man 7 debconf, this is an instance of the select variable type:

select A choice between one of a number of values. The choices must be specified in
       a  field  named  'Choices'.  Separate  the  possible  values with commas and
       spaces, like this:
         Choices: yes, no, maybe

The Choices-C field is closely related:

      If this environment variable is set to 'true', the frontend will display the values
      in Choices-C fields (if present) of select and multiselect  templates  rather  than
      the descriptive values.
| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.