This file is indexed.

prerm is in portsentry 1.2-14build1.

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
#$Id: prerm,v 1.4 2003/09/08 18:09:03 agx Exp $

set -e

# rm symbolic link to /usr/doc/portsentry when package gets removed or
# upgraded 
# keep this for one stable release to get rid of the symlink
if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/portsentry ]; then
	rm -f /usr/doc/portsentry
fi

# to avoid long downtimes upon mass upgrades do not stop the daemon.
# Unfortunately maintainer scripts prior to 1.0-1.2 don't know anything 
# about this. So we have to stop the daemon on downgrades.
if [ -n "$2" ] && dpkg --compare-versions $2 lt 1.0-2 ; then
    if [ -x /usr/sbin/invoke-rc.d ]; then
    	invoke-rc.d portsentry stop
    else
        /etc/init.d/portsentry stop
    fi
elif [ "$1" != "upgrade" ]; then
    if [ -x /usr/sbin/invoke-rc.d ]; then
    	invoke-rc.d portsentry stop
    else
        /etc/init.d/portsentry stop
    fi
fi

# Automatically added by dh_installinit/11.1.6ubuntu1
if [ -x "/etc/init.d/portsentry" ]; then
	invoke-rc.d portsentry stop || exit 1
fi
# End automatically added section