Debian Codegraph @

debian/postrm

raw
1 #!/bin/sh
2
3 set -e
4
5 # summary of how this script can be called:
6 #
7 # * <postrm> `remove'
8 # * <postrm> `purge'
9 # * <old-postrm> `upgrade' <new-version>
10 # * <disappearer's-postrm> `disappear' <overwriter> <overwriter-version>
11 # * <new-postrm> `failed-upgrade' <old-version> <new-version>
12 # * <new-postrm> `abort-install'
13 # * <new-postrm> `abort-install' <old-version> <new-version>
14 # * <new-postrm> `abort-upgrade' <old-version> <new-version>
15 #
16 # for details, see https://www.debian.org/doc/debian-policy/ or
17 # the debian-policy package
18
19 case "$1" in
20 purge)
21 deluser --quiet --system libvirtdbus || true
22
23 # The call to deluser will normally delete the group as well,
24 # but just in case it didn't (for example because the local
25 # admin had added more users to the group) let's give it
26 # another shot. In this case however we need to check whether
27 # the group exists first, because delgroup doesn't deal
28 # gracefully with the group not existing
29 if getent group libvirtdbus >/dev/null 2>&1; then
30 delgroup --quiet --system libvirtdbus || true
31 fi
32 ;;
33
34 remove|upgrade|disappear|failed-upgrade|abort-install|abort-upgrade)
35 ;;
36
37 *)
38 echo "postrm called with unknown argument \`$1'" >&2
39 exit 1
40 ;;
41 esac
42
43 #DEBHELPER#
44
45 exit 0