]> git.proxmox.com Git - pmg-api.git/commit
Use ucf to handle template overrides
authorStoiko Ivanov <s.ivanov@proxmox.com>
Wed, 8 Apr 2020 17:40:51 +0000 (19:40 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 14 Apr 2020 07:35:07 +0000 (09:35 +0200)
commitac81f7c976273df65c7fce0691303b959a595364
treebc3b48999a7f82cc35cc7c13b799d3006395c711
parentafd87d50ffa1414a6e6daf9cedb2a8995c661cfc
Use ucf to handle template overrides

ucf(1) is a utility to track changes in config files which are not shipped in
the debian package (but e.g. get generated through the postinst script)

While the template overriding mechanism of PMG does not directly write those
config files - users who override a config-file currently need to manually
compare the templates shipped in '/var/lib/pmg/templates' on every upgrade.

By selectively registering the existing template overrides with ucf, users get
asked once upon the next upgrade regarding their changes, and then will
always get prompted when the shipped default template changes.

The alternative of unconditionally registering all templates with ucf, as done
by dh_ucf (1), would copy all templates to /etc/pmg/templates, which I deemed
less elegant.

The postrm script's check for the existance of 'ucf' only should be sufficient,
since the other ucf executables used ('ucfq' and 'ucfr' are all shipped with
the 'ucf' package)

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
[ dropped some extra lines left over from v1 ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
debian/postinst
debian/postrm [new file with mode: 0644]