This file is indexed.

postinst is in shorewall6 4.4.26.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
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
#!/bin/sh -e

. /usr/share/debconf/confmodule 


case "$1" in
    configure)
        db_reset shorewall6/dont_restart || true
        db_reset shorewall6/major_release || true
        db_go

# Prompt the user about possible changes in new major release (this
# section was previously in configure script)
        
        restart="true"

        # if we are upgrading from version < 3.4 warns the user
        if [ "$2" ] && dpkg --compare-versions "$2" lt "3.4"
        then
            db_input critical shorewall6/major_release || true
            db_go 
            
            db_get shorewall6/major_release || true
            if [ "$RET" = "false" ]
            then
                restart="false"
                db_input critical shorewall6/dont_restart || true
                db_go 
            fi
        fi

        if [ -f "/etc/default/shorewall6" ]
        then
            . /etc/default/shorewall6
        fi

        if [ "$restart" = "true" ] && [ "$startup" = "1" ]
        then 
            if /sbin/shorewall6 check
            then
                if [ -x "/usr/sbin/invoke-rc.d" ]
                then
                    invoke-rc.d shorewall6 restart
                else
                    /etc/init.d/shorewall6 restart
                fi
            else
                db_input critical shorewall6/invalid_config || true
            fi
        fi
        ;;
    
    abort-upgrade|abort-remove|abort-deconfigure)
        ;;
        
    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 0
        ;;
esac

# Automatically added by dh_installinit
if [ -x "/etc/init.d/shorewall6" ]; then
	update-rc.d shorewall6 start 40 S . stop 89 0 6 . >/dev/null || exit $?
fi
# End automatically added section