summaryrefslogtreecommitdiffstats
path: root/debian/dselect.postrm
blob: 7376dd6726d91df4abe04f07ae3f0ab7cf87f49c (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 multicd; 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