This file is indexed.

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

. /usr/share/debconf/confmodule 


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

        if [ ! -d /var/lib/shorewall ]
        then
            mkdir -p /var/lib/shorewall
        fi

        # The init script was moved from shorewall-common to shorewall, but
        # the shorewall-common postrm tries to remove the symlinks, which
        # cannot happen since /etc/init.d/shorewall now exists in the
        # shorewall package.
        if [ -f "/var/lib/dpkg/info/shorewall-common.postrm" ]
        then
            rm -f /var/lib/dpkg/info/shorewall-common.postrm
        fi

        restart="true"

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

        if [ "$restart" = "true" ] && [ "$startup" = "1" ]
        then 
            if /sbin/shorewall check
            then
                if [ -d "/run/systemd/system" ] && [ -f "/lib/systemd/system/shorewall.service" ]
                then
                    deb-systemd-helper enable shorewall.service
                    deb-systemd-invoke restart shorewall.service
                elif [ -f "/etc/init.d/shorewall" ]
                then
                    if [ -x "/usr/sbin/invoke-rc.d" ]
                    then
                        invoke-rc.d shorewall restart
                    else
                        /etc/init.d/shorewall restart
                    fi
                fi
            else
                db_input critical shorewall/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/shorewall" ]; then
		update-rc.d shorewall defaults >/dev/null || exit 1
	fi
fi
# End automatically added section