debconf config.datファイルの形式は何ですか?

debconf config.datファイルの形式は何ですか?

/var/cache/debconf/config.datdebconfには、設定質問に対する回答を含むファイルがあります。例えば、

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

それらは何でNameあり、Templateなぜいつも同じように見えますか?ValueそしてOwnersそれは十分に明確に見えます。最も重要なのは、Variables部品の目的は何ですか?私はこのセクション全体が変数を説明していると思います。

ベストアンサー1

技術的には、このセクションでは質問、 debconf 用語で。

に関してはTemplateそのPerlモジュールのドキュメントテキスト:

新しいテンプレートを作成すると、テンプレートと同じ名前の質問が生成されます。これは、テンプレートに少なくとも1人の所有者(問題)があることを確認し、debconfユーザーが問題を手動で登録する必要がないように生活を簡単にすることです。

まあ、所有者フィールドは実際に問題の所有者を設定するために使用されます。

ほとんどのdebconfユーザーは、同じテンプレートに基づいて追加の問題を生成する必要はありません。

このセクションを理解するには、適切Variablesなテンプレートを見つける必要があります。この場合、profilesオプションのリスト(参照/var/cache/debconf/templates.dat)は次のとおりです。

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

そしてからman 7 debconfは変数型のインスタンスですselect

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

このChoices-Cフィールドは以下に密接に関連しています。

DEBCONF_C_VALUES
      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.

おすすめ記事