This file is indexed.

postinst is in shorewall6 5.1.12.2-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
74
75
#!/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 [ -d "/run/systemd/system" ] && [ -f "/lib/systemd/system/shorewall6.service" ]
                then
                    deb-systemd-helper enable shorewall6.service
                    deb-systemd-invoke restart shorewall6.service
                elif [ -f "/etc/init.d/shorewall6" ]
                then
                    if [ -x "/usr/sbin/invoke-rc.d" ]
                    then
                        invoke-rc.d shorewall6 restart
                    else
                        /etc/init.d/shorewall6 restart
                    fi
                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/11.1.4ubuntu1
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
	if [ -x "/etc/init.d/shorewall6" ]; then
		update-rc.d shorewall6 defaults >/dev/null || exit 1
	fi
fi
# End automatically added section