diff options
author | Alexander Sulfrian <asulfrian@zedat.fu-berlin.de> | 2022-01-29 19:59:03 +0100 |
---|---|---|
committer | Alexander Sulfrian <asulfrian@zedat.fu-berlin.de> | 2022-01-30 05:03:22 +0100 |
commit | 49cf4482ea952de6bcf3c023c017309cd7926c15 (patch) | |
tree | 1d9e809b49da5d3de4909ef4b5f2c4703a9ebea9 | |
parent | aac1945e6a4a2a94736e2a2ff7a761121cb65a19 (diff) | |
download | bcfg2-49cf4482ea952de6bcf3c023c017309cd7926c15.tar.gz bcfg2-49cf4482ea952de6bcf3c023c017309cd7926c15.tar.bz2 bcfg2-49cf4482ea952de6bcf3c023c017309cd7926c15.zip |
debconf: Add ability to ignore conf settings
-rw-r--r-- | schemas/types.xsd | 9 | ||||
-rw-r--r-- | src/lib/Bcfg2/Client/Tools/Debconf.py | 3 |
2 files changed, 12 insertions, 0 deletions
diff --git a/schemas/types.xsd b/schemas/types.xsd index fc2e7bdc4..dc57c5cc8 100644 --- a/schemas/types.xsd +++ b/schemas/types.xsd @@ -570,6 +570,15 @@ </xsd:documentation> </xsd:annotation> </xsd:attribute> + <xsd:attribute type="xsd:boolean" name="ignore" default="false"> + <xsd:annotation> + <xsd:documentation> + If you set this to "true" the configuration setting will be ignored + and not updated. This is usefull to remove a setting from the list of + extra entries. + </xsd:documentation> + </xsd:annotation> + </xsd:attribute> <xsd:attributeGroup ref="py:genshiAttrs"/> </xsd:complexType> </xsd:schema> diff --git a/src/lib/Bcfg2/Client/Tools/Debconf.py b/src/lib/Bcfg2/Client/Tools/Debconf.py index 0d286028b..706f7a8dc 100644 --- a/src/lib/Bcfg2/Client/Tools/Debconf.py +++ b/src/lib/Bcfg2/Client/Tools/Debconf.py @@ -68,6 +68,9 @@ class Debconf(Bcfg2.Client.Tools.Tool): def VerifyConf(self, entry, _modlist): """ Verify the given Debconf entry. """ + if entry.get('ignore', 'false').lower() == 'true': + return True + (_, current_value) = self.debconf_get(entry.get('name')) entry.set('current_value', current_value) return current_value == entry.get('value') |