From 3390e19f8a2947295551371c8ab2839573a1dca1 Mon Sep 17 00:00:00 2001 From: Jeroen Schot Date: Fri, 22 Apr 2011 12:15:10 +0200 Subject: Bug#213078: debhelper: please consider providing dh_ucf Here is a patch against the master branch that adds such a command called dh_installucf. It also registers the conffiles with ucfr and removes stray ucf-{new,old,dist} files on purge. --- autoscripts/postinst-ucf | 4 ++++ autoscripts/postrm-ucf | 12 ++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 autoscripts/postinst-ucf create mode 100644 autoscripts/postrm-ucf (limited to 'autoscripts') diff --git a/autoscripts/postinst-ucf b/autoscripts/postinst-ucf new file mode 100644 index 00000000..633d3ff3 --- /dev/null +++ b/autoscripts/postinst-ucf @@ -0,0 +1,4 @@ +if [ "$1" = "configure" ]; then + ucf #UCFSRC# #UCFDEST# + ucfr #PACKAGE# #UCFDEST# +fi diff --git a/autoscripts/postrm-ucf b/autoscripts/postrm-ucf new file mode 100644 index 00000000..47237a41 --- /dev/null +++ b/autoscripts/postrm-ucf @@ -0,0 +1,12 @@ +if [ "$1" = "purge" ]; then + for ext in .ucf-new .ucf-old .ucf-dist ""; do + rm -f #UCFDEST#$ext + done + + if [ -x `which ucf 2>/dev/null`]; then + ucf --purge #UCFDEST# + fi + if [ -x `which ucfr 2>/dev/null`]; then + ucfr --purge #PACKAGE# #UCFDEST# + fi +fi -- cgit v1.2.3