summaryrefslogtreecommitdiffstats
path: root/debian/squeeze/tdebase/debian/tdm-trinity.postrm
blob: 0cd027c455b3f5c428625ad61bcdab22653fb3c2 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
#! /bin/sh -e

case "$1" in
    purge)
	rm -rf /var/log/tdm-trinity.log*
    ;;

    remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)

    ;;

    *)
        echo "postrm called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

if [ "$1" = "abort-install" -o "$1" = "abort-upgrade" ]; then
  # roll back displacement of default display manager file
  if [ -e "$DEFAULT_DISPLAY_MANAGER_FILE.dpkg-tmp" ]; then
    # FIXME - redo this part uses shell-lib.sh from xfree86
    #observe "rolling back change of default X display manager"
    mv "$DEFAULT_DISPLAY_MANAGER_FILE.dpkg-tmp" "$DEFAULT_DISPLAY_MANAGER_FILE"
  fi
fi

if [ "$1" = "purge" ]; then
  for DIR in /var/lib/tdm-trinity; do
    if [ -d "$DIR" ]; then
      rm -rf "$DIR"
    fi
  done
  rm -f /var/log/tdm-trinity.log*
fi

if [ "$1" = "purge" ] ; then
    if [ -x "`which update-rc.d 2>/dev/null`" ]; then
        update-rc.d tdm remove >/dev/null
    fi
fi
if [ -d /run/systemd/system ] ; then
        systemctl --system daemon-reload >/dev/null || true
fi

#DEBHELPER#

exit 0