This file is indexed.

preinst is in arno-iptables-firewall 2.0.1.d-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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/sh
# preinst script for arno-iptables-firewall

set -e

# Move a conffile. In case of an unmodified file simply
# remove it to not trigger dpkg questions.
# However, if the file is modified this question should occur.
mv_conffile() 
{
    CONFFILE="$1"
    NEWLOCATION="$2"

    if [ -e "$CONFFILE" ]; then
        md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`"
        old_md5sum=$(dpkg-query -W -f='${Conffiles}' arno-iptables-firewall | grep ${CONFFILE} | awk '{ print $2 }')
        if [ "$md5sum" = "$old_md5sum" ]; then
            rm -f "$CONFFILE"
        else
            mv "$CONFFILE" "$NEWLOCATION"
        fi
    fi
}

case "$1" in
    install|upgrade)
        if dpkg --compare-versions "$2" le "1.8.6.c-4"; then
            if [ -e /etc/default/arno-iptables-firewall ]; then
                echo "Moving old firewall configuration to /etc/arno-iptables-firewall/firewall.conf."

                if [ ! -d /etc/arno-iptables-firewall ]; then 
                    mkdir /etc/arno-iptables-firewall
                fi

                mv_conffile "/etc/default/arno-iptables-firewall" "/etc/arno-iptables-firewall/firewall.conf"
            fi
        fi
        if dpkg --compare-versions "$2" le "1.8.8.l-1"; then
            echo "Moving plugins from /etc to /usr/share/arno-iptables-firewall/plugins."
            for f in /etc/arno-iptables-firewall/plugins/*.plugin; do
                mv_conffile "$f" "$f.dpkg-old"
            done
        fi
        if dpkg --compare-versions "$2" le "1.9.2.h-1~"; then
            echo "Updating firewall startup behavior -- delayed until network becomes available."
            update-rc.d -f arno-iptables-firewall remove
        fi
        # Move the old pre-conf.d debconf settings into the new location and
        # format
        if [ -e /etc/arno-iptables-firewall/debconf.cfg ]; then
            mkdir -p /etc/arno-iptables-firewall/conf.d/
            sed -e 's/^DC_//' < /etc/arno-iptables-firewall/debconf.cfg \
                              > /etc/arno-iptables-firewall/conf.d/00debconf.conf
            rm -f /etc/arno-iptables-firewall/debconf.cfg
        fi

    ;;

    abort-upgrade)
    ;;

    *)
        echo "preinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.



exit 0