This file is indexed.

prerm is in gpm 1.20.7-5.

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

set -e

stop_gpm ()
{
  # Try several methods of stopping the daemon.
  # The init.d script had problems in earlier revisions.

  invoke-rc.d gpm stop ||

  gpm -k ||

  # Try stopping gpm via the executable and via the PID file.
  # The PID filename changed between 1.14 and 1.16, so we try both.
  start-stop-daemon --stop --quiet --exec /usr/sbin/gpm ||
  start-stop-daemon --stop --quiet --pidfile /var/run/gpmpid ||
  start-stop-daemon --stop --quiet --pidfile /var/run/gpm.pid ||

  # If all of the above fails, assume gpm was already stopped.
  true
}

if [ "$1" != "upgrade" ]; then
  # Note, we do /NOT/ stop gpm on upgrade, as it may be repeating to X..
  # However we do want to stop it if the upgrade fails.
  stop_gpm
fi