This file is indexed.

preinst is in varnish 4.1.1-1.

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

set -e

# Undo mangling of /etc/default/varnish that happened during lenny->squeeze
# upgrades.
unmangle_defaults() {
    export defaultsfile='/etc/default/varnish'

    if ! [ -f "$defaultsfile" ]; then
        return
    fi

    # The checksums in the package that introduced the bug
    md5_before_change='af3fd9c9e3dd6976367638113373f6f7'
    md5_after_change='708e91b32d1ae5eed7f82d772c2fd421'

    # The checksum in the current package
    md5_in_package=$(dpkg-query -f '${Conffiles}' -W varnish \
        | awk '$1 == ENVIRON["defaultsfile"] {print $2}')

    # The checksum in the file system
    md5_in_filesystem=$(md5sum "$defaultsfile" | awk '{print $1}')

    if [ "$md5_in_package" = "$md5_before_change" -a "$md5_in_filesystem" = "$md5_after_change" ]; then
	sed -i '/^START=/s/yes/no/g' "$defaultsfile"
    fi
}

case "$1" in
    install|upgrade)
        if dpkg --compare-versions "$2" "lt-nl" "3.0.3-1~"; then
            unmangle_defaults
        fi
        ;;
esac