File: libapache-mod-security.preinst

package info (click to toggle)
modsecurity-apache 2.6.6-6%2Bdeb7u2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 4,660 kB
  • sloc: ansic: 26,421; sh: 10,265; perl: 1,338; makefile: 240
file content (32 lines) | stat: -rw-r--r-- 844 bytes parent folder | download
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
#!/bin/sh
# Copyright 2012 Alberto Gonzalez Iniesta <agi@agi.as>
# Licensed under the GNU General Public License, version 2.  See the file
# /usr/share/common-licenses/GPL-2
# 
set -e
test $DEBIAN_SCRIPT_DEBUG && set -v -x

# libapache-mod-security versions previous to 2.5.13-1 had 
# /usr/share/doc/libapache-mod-security as a symlink to mod-security-common
# This is now gone, and should be deleted in order to get replaced with its
# own /usr/share/doc/libapache-mod-security directory
# We'll check versions older that 2.6.6-3 just to make sure noone got caught
# with this bug

case "$1" in
    upgrade)

    if `dpkg --compare-versions $2 lt 2.6.6-3`
    then
        if [ -h /usr/share/doc/libapache-mod-security ]
        then
            rm -f /usr/share/doc/libapache-mod-security
        fi
    fi
    ;;

esac

#DEBHELPER#

exit 0