summaryrefslogtreecommitdiffstats
path: root/debian/postrm
blob: d1ad73ff52001eacb9c71b7cfefc51dcea11c7fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#! /bin/sh

set -e

CONFDEST="/etc/debtree"

case $1 in
    purge)
	for file in skiplist endlist; do
		# remove configuration files with dpkg backup extensions
		for ext in '~' '%' .bak .ucf-new .ucf-old .ucf-dist; do
			rm -f $CONFDEST/$file$ext
		done

		# remove the configuration file itself
		rm -f $CONFDEST/$file

		# clear it out from the ucf database
		if which ucf >/dev/null; then
			ucf --purge $CONFDEST/$file
		fi
	done
	;;
esac

#DEBHELPER#