summaryrefslogtreecommitdiff
path: root/debian/gnunet.postrm
diff options
context:
space:
mode:
Diffstat (limited to 'debian/gnunet.postrm')
-rw-r--r--debian/gnunet.postrm66
1 files changed, 31 insertions, 35 deletions
diff --git a/debian/gnunet.postrm b/debian/gnunet.postrm
index 4b60c570a..592fe04a1 100644
--- a/debian/gnunet.postrm
+++ b/debian/gnunet.postrm
@@ -3,11 +3,11 @@
set -e
remove_gns() {
- # abort if /etc/nsswitch.conf does not exist
- if ! [ -e /etc/nsswitch.conf ]; then
- return
- fi
- perl -i -pe '
+ # abort if /etc/nsswitch.conf does not exist
+ if ! [ -e /etc/nsswitch.conf ]; then
+ return
+ fi
+ perl -i -pe '
my @remove=(
"gns [NOTFOUND=return]",
);
@@ -25,45 +25,41 @@ remove_gns() {
_USERNAME="gnunet"
_GROUPNAME="gnunet"
GNUNETDNS_GROUP="gnunetdns"
-if [ -e /usr/share/debconf/confmodule ]
-then
- . /usr/share/debconf/confmodule
- db_version 2.0
+if [ -e /usr/share/debconf/confmodule ]; then
+ . /usr/share/debconf/confmodule
+ db_version 2.0
- db_get gnunet-dns/libnsswitch
- _LIBNSSWITCH="${RET}"
+ db_get gnunet-dns/libnsswitch
+ _LIBNSSWITCH="${RET}"
fi
-
case "${1}" in
- purge)
- if $_LIBNSSWITCH
- then
- rm -rf /usr/lib/x86_64-linux-gnu/usr/libnss_gns.so.2
- rm -rf /usr/lib/x86_64-linux-gnu/usr/libnss_gns4.so.2
- rm -rf /usr/lib/x86_64-linux-gnu/usr/libnss_gns6.so.2
- remove_gns
- fi
+purge)
+ if $_LIBNSSWITCH; then
+ rm -rf /usr/lib/x86_64-linux-gnu/usr/libnss_gns.so.2
+ rm -rf /usr/lib/x86_64-linux-gnu/usr/libnss_gns4.so.2
+ rm -rf /usr/lib/x86_64-linux-gnu/usr/libnss_gns6.so.2
+ remove_gns
+ fi
- rm -rf /var/log/gnunet.log /var/lib/gnunet /etc/default/gnunet
- ;;
+ rm -rf /var/log/gnunet.log /var/lib/gnunet /etc/default/gnunet
+ ;;
- remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+remove | upgrade | failed-upgrade | abort-install | abort-upgrade | disappear)
- if $_LIBNSSWITCH
- then
- rm -rf /usr/lib/x86_64-linux-gnu/usr/libnss_gns.so.2
- rm -rf /usr/lib/x86_64-linux-gnu/usr/libnss_gns4.so.2
- rm -rf /usr/lib/x86_64-linux-gnu/usr/libnss_gns6.so.2
- remove_gns
- fi
+ if $_LIBNSSWITCH; then
+ rm -rf /usr/lib/x86_64-linux-gnu/usr/libnss_gns.so.2
+ rm -rf /usr/lib/x86_64-linux-gnu/usr/libnss_gns4.so.2
+ rm -rf /usr/lib/x86_64-linux-gnu/usr/libnss_gns6.so.2
+ remove_gns
+ fi
- ;;
+ ;;
- *)
- echo "postrm called with unknown argument \`${1}'" >&2
- exit 1
- ;;
+*)
+ echo "postrm called with unknown argument \`${1}'" >&2
+ exit 1
+ ;;
esac
#DEBHELPER#