File: postrm

package info (click to toggle)
debtree 1.0.6
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 408 kB
  • ctags: 41
  • sloc: perl: 927; sh: 136; makefile: 2
file content (24 lines) | stat: -rw-r--r-- 451 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#! /bin/sh -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#