File: postrm

package info (click to toggle)
debtree 1.1.2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 420 kB
  • sloc: perl: 972; sh: 138; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 456 bytes parent folder | download | duplicates (4)
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#