summaryrefslogtreecommitdiffstats
path: root/debian/dselect.postrm
blob: 8fd119171ec099946833c18f973c9687f6f92274 (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
27
28
29
30
31
32
33
34
#!/bin/sh
# See deb-postrm(5).

set -e

# Remove dselect methods state.
purge_state() {
  admindir=${DPKG_ADMINDIR:-/var/lib/dpkg}

  rm -f $admindir/cmethopt 2>/dev/null
  for method in disk ftp mnt media; do
    rm -rf $admindir/methods/$method/* 2>/dev/null
  done
}

case "$1" in
remove)
  ;;
purge)
  purge_state
  ;;
upgrade)
  ;;
failed-upgrade|disappear|abort-install|abort-upgrade)
  ;;
*)
  echo "$0 called with unknown argument '$1'" 1>&2
  exit 1
  ;;
esac

#DEBHELPER#

exit 0