diff options
Diffstat (limited to 'distro/pkg/deb/bird2.postrm')
-rw-r--r-- | distro/pkg/deb/bird2.postrm | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/distro/pkg/deb/bird2.postrm b/distro/pkg/deb/bird2.postrm new file mode 100644 index 00000000..ab03e6e6 --- /dev/null +++ b/distro/pkg/deb/bird2.postrm @@ -0,0 +1,26 @@ +#!/bin/sh +set -e + +if test "$1" = "purge"; then + + # Check if there is no collision of ownership of /etc/bird/bird.conf + if ! command -v ucf ucfr >/dev/null || ucfr bird2 /etc/bird/bird.conf 2>/dev/null; then + dpkg-statoverride --remove /etc/bird >/dev/null 2>/dev/null || true + dpkg-statoverride --remove /etc/bird/bird.conf >/dev/null 2>/dev/null || true + + for ext in '~' '%' .bak .ucf-new .ucf-old .ucf-dist; do + rm -f /etc/bird/bird.conf$ext + done + rm -f /etc/bird/bird.conf + if command -v ucf ucfr >/dev/null; then + ucf --purge /etc/bird/bird.conf + ucfr --purge bird2 /etc/bird/bird.conf + fi + + deluser --quiet bird > /dev/null || true + fi +fi + +#DEBHELPER# + +exit 0 |