This file is indexed.

prerm is in italc-client 1:2.0.2+dfsg1-4.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#! /bin/sh

# prerm script for italc-client
#
# see: dh_installdeb(1)
# summary of how this script can be called:
#        * <postrm> `remove'
#        * <postrm> `purge'
#        * <old-postrm> `upgrade' <new-version>
#        * <new-postrm> `failed-upgrade' <old-version>
#        * <new-postrm> `abort-install'
#        * <new-postrm> `abort-install' <old-version>
#        * <new-postrm> `abort-upgrade' <old-version>
#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
# for details, see /usr/share/doc/packaging-manual/

set -e

# Source debconf library.
. /usr/share/debconf/confmodule

case "$1" in
	remove)
		# The package is being removed in its own right.
		if dpkg-statoverride --list /usr/bin/italc_auth_helper >/dev/null; then
			dpkg-statoverride --remove /usr/bin/italc_auth_helper
		fi

		db_get italc-client/use-existing-groups-for-roles || true
		use_existing=$RET
		db_get italc-client/create-groups-for-roles || true
		create_groups=$RET

		# only if we previously created iTALC's role-groups, we remove them on package purgal...
		if [ "$use_existing" = "false" ] && [ "$create_groups" = "true" ]; then
			for role in admin supporter teacher student; do

				db_get italc-client/group-italc-$role || true
				group=$(echo $RET | cut -d" " -f1)

				if echo "$group" | egrep -v '^[[:digit:]]{1,5}$' 1>/dev/null; then

					# only attempt removal of non-system groups that actually exist...
					if getent group $group 1>/dev/null && [ $(getent group $group | cut -d ":" -f3) -ge 100 ]; then
						delgroup $group 1>/dev/null
					fi
				fi
			done
		fi
		;;
	deconfigure|upgrade|failed-upgrade)
		:
		;;
	*) echo "$0: didn't understand being called with \`$1'" 1>&2
		exit 1;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.



exit 0