~jdstrand/ufw/ufw-xenial

« back to all changes in this revision

Viewing changes to debian/postrm

  • Committer: Jamie Strandboge
  • Date: 2012-07-06 19:29:50 UTC
  • Revision ID: jamie@canonical.com-20120706192950-1whf5yyzv2v2xc6c
Release 0.32-0ubuntu1

* New upstream release featuring Python 3 port (LP: #1001657)
* debian/control:
  - clean up Depends and Build-Depends
  - Build-Depends on python3
  - add python-ufw for installing python2 modules
  - add X-Python3-Version: >= 3.2
  - update Vcs-Bzr
* add debian/python-ufw.install
* debian/rules:
  - use --install-layout=deb
  - adjust PYTHON to use python3
  - adjust PYVERS to use py3versions
  - add PYTHON2
  - run tests for both PYTHON and PYTHON2
  - run setup.py with both PYTHON and PYTHON2
  - use dh_python3 for ufw
  - use dh_python2 for python-ufw
* debian/ufw.lintian-overrides
  - remove old unneeded override
  - add postrm-does-not-call-updaterc.d-for-init.d-script since Ubuntu's
    debhelper adds code to postinst that does nothing on Ubuntu, but doesn't
    add the corresponding code to postrm
* New upstream release (Closes: 663677, Closes: 625681)
* debian/control: update to standards 3.9.3
* convert to source format 3.0 (quilt)
* 0001-optimize-boot.patch: only read in /etc/ufw/ufw.conf when disabled
* debian/rules: adjust to only install the application profiles when not
  Ubuntu
* debian/po/da.po: add Danish translation of debconf templates. Thanks to
  Joe Dalton (Closes: 666557)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh -e
2
 
 
3
 
RULES_PATH="/etc/ufw"
4
 
USER_PATH="/lib/ufw"
5
 
UFW_CONF="/etc/ufw/ufw.conf"
6
 
case "$1" in
7
 
    remove)
8
 
        ;;
9
 
 
10
 
    purge)
11
 
        if [ -e /usr/share/debconf/confmodule ]; then
12
 
            . /usr/share/debconf/confmodule
13
 
            db_purge
14
 
        fi
15
 
 
16
 
        for f in before.rules before6.rules after.rules after6.rules
17
 
        do
18
 
            if which ucf > /dev/null 2>&1; then
19
 
                ucf -p $RULES_PATH/$f
20
 
            fi
21
 
            rm -f $RULES_PATH/$f
22
 
            rm -f $RULES_PATH/$f.ucf-old $RULES_PATH/$f.ucf-new $RULES_PATH/$f.ucf-dist
23
 
        done
24
 
        rm -f $RULES_PATH/ufw.rules $RULES_PATH/ufw.rules.dpkg-old
25
 
        rm -f $USER_PATH/user.rules $USER_PATH/user6.rules
26
 
 
27
 
        # go back to default accept, if ufw was enabled
28
 
        if [ -f "$UFW_CONF" ] && grep -qi "^ENABLED=yes" "$UFW_CONF"; then
29
 
            for exe in iptables ip6tables
30
 
            do
31
 
                if which $exe > /dev/null 2>&1; then
32
 
                    $exe -P INPUT ACCEPT 2>/dev/null || true
33
 
                    $exe -P OUTPUT ACCEPT 2>/dev/null || true
34
 
                    $exe -P FORWARD ACCEPT 2>/dev/null || true
35
 
                    $exe -F 2>/dev/null || true
36
 
                    $exe -X 2>/dev/null || true
37
 
                fi
38
 
            done
39
 
        fi
40
 
 
41
 
        rm -f "$UFW_CONF"
42
 
        ;;
43
 
 
44
 
    upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
45
 
        ;;
46
 
 
47
 
    *)
48
 
        echo "postrm called with unknown argument '$1'" >&2
49
 
        exit 1
50
 
        ;;
51
 
esac
52
 
 
53
 
#DEBHELPER#