This file is indexed.

prerm is in ecryptfs-utils 104-0ubuntu1.

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
#!/bin/sh -e

if [ "$1" = remove ]; then
	# We should do some checking to prevent removal of ecryptfs if in use
	# Check active mounts
	if out=`mount | grep "\Wtype\Wecryptfs\W"`; then
		echo "WARNING: Should not remove ecryptfs-utils, as it appears to be in use:" 1>&2
		echo "$out" 1>&2
	fi
	if out=`grep "\Wecryptfs\W" /proc/mounts`; then
		echo "WARNING: Should not remove ecryptfs-utils, as it appears to be in use:" 1>&2
		echo "$out" 1>&2
	fi
	# Check fstab
	if out=`grep "\Wecryptfs\W" /etc/fstab`; then
		echo "WARNING: Should not remove ecryptfs-utils, as it appears to be in use:" 1>&2
		echo "$out" 1>&2
	fi
	# Check home directories
	for i in `ls /home`; do
		if [ -d "/home/$i/.ecryptfs" ]; then
			# If we find a .ecryptfs directory (or link) in a home,
			# directory, then someone is using ecryptfs-utils, and
			# we should not allow package removal
			echo "WARNING: Should not remove ecryptfs-utils, as it appears to be in use:" 1>&2
			echo "       [/home/$i/.ecryptfs]" 1>&2
		fi
	done
	pam-auth-update --package --remove ecryptfs-utils
fi



exit 0