File: denyhosts.prerm

package info (click to toggle)
denyhosts 2.6-4
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 464 kB
  • ctags: 420
  • sloc: python: 2,159; sh: 356; makefile: 19
file content (28 lines) | stat: -rw-r--r-- 594 bytes parent folder | download | duplicates (4)
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
# prerm script for denyhosts

set -e

case "$1" in
    remove|upgrade|deconfigure)
        ;;
    failed-upgrade)
        # workarround to bug #393461 in denyhosts version < 2.5-3
        if dpkg --compare-versions "$2" lt "2.5-3"; then
            if [ ! -e /var/run/denyhosts.pid ]; then
	        # denyhosts isn't running then the broken
		# initscript ends with an error.
		# Skipping all DEBHELPER tasks
                exit 0
            fi
        fi
        ;;
    *)
        echo "prerm called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

#DEBHELPER#

exit 0