File: postrm

package info (click to toggle)
libvirt-dbus 1.4.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 888 kB
  • sloc: ansic: 8,558; xml: 1,588; python: 926; sh: 149; makefile: 19
file content (45 lines) | stat: -rw-r--r-- 1,346 bytes parent folder | download | duplicates (2)
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
#!/bin/sh

set -e

# summary of how this script can be called:
#
#   * <postrm> `remove'
#   * <postrm> `purge'
#   * <old-postrm> `upgrade' <new-version>
#   * <disappearer's-postrm> `disappear' <overwriter> <overwriter-version>
#   * <new-postrm> `failed-upgrade' <old-version> <new-version>
#   * <new-postrm> `abort-install'
#   * <new-postrm> `abort-install' <old-version> <new-version>
#   * <new-postrm> `abort-upgrade' <old-version> <new-version>
#
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package

case "$1" in
    purge)
        deluser --quiet --system libvirtdbus || true

        # The call to deluser will normally delete the group as well,
        # but just in case it didn't (for example because the local
        # admin had added more users to the group) let's give it
        # another shot. In this case however we need to check whether
        # the group exists first, because delgroup doesn't deal
        # gracefully with the group not existing
        if getent group libvirtdbus >/dev/null 2>&1; then
            delgroup --quiet --system libvirtdbus || true
        fi
    ;;

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

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

#DEBHELPER#

exit 0