aboutsummaryrefslogtreecommitdiff
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 @@
3set -e 3set -e
4 4
5remove_gns() { 5remove_gns() {
6 # abort if /etc/nsswitch.conf does not exist 6 # abort if /etc/nsswitch.conf does not exist
7 if ! [ -e /etc/nsswitch.conf ]; then 7 if ! [ -e /etc/nsswitch.conf ]; then
8 return 8 return
9 fi 9 fi
10 perl -i -pe ' 10 perl -i -pe '
11 my @remove=( 11 my @remove=(
12 "gns [NOTFOUND=return]", 12 "gns [NOTFOUND=return]",
13 ); 13 );
@@ -25,45 +25,41 @@ remove_gns() {
25_USERNAME="gnunet" 25_USERNAME="gnunet"
26_GROUPNAME="gnunet" 26_GROUPNAME="gnunet"
27GNUNETDNS_GROUP="gnunetdns" 27GNUNETDNS_GROUP="gnunetdns"
28if [ -e /usr/share/debconf/confmodule ] 28if [ -e /usr/share/debconf/confmodule ]; then
29then 29 . /usr/share/debconf/confmodule
30 . /usr/share/debconf/confmodule 30 db_version 2.0
31 db_version 2.0
32 31
33 db_get gnunet-dns/libnsswitch 32 db_get gnunet-dns/libnsswitch
34 _LIBNSSWITCH="${RET}" 33 _LIBNSSWITCH="${RET}"
35fi 34fi
36 35
37
38case "${1}" in 36case "${1}" in
39 purge) 37purge)
40 if $_LIBNSSWITCH 38 if $_LIBNSSWITCH; then
41 then 39 rm -rf /usr/lib/x86_64-linux-gnu/usr/libnss_gns.so.2
42 rm -rf /usr/lib/x86_64-linux-gnu/usr/libnss_gns.so.2 40 rm -rf /usr/lib/x86_64-linux-gnu/usr/libnss_gns4.so.2
43 rm -rf /usr/lib/x86_64-linux-gnu/usr/libnss_gns4.so.2 41 rm -rf /usr/lib/x86_64-linux-gnu/usr/libnss_gns6.so.2
44 rm -rf /usr/lib/x86_64-linux-gnu/usr/libnss_gns6.so.2 42 remove_gns
45 remove_gns 43 fi
46 fi
47 44
48 rm -rf /var/log/gnunet.log /var/lib/gnunet /etc/default/gnunet 45 rm -rf /var/log/gnunet.log /var/lib/gnunet /etc/default/gnunet
49 ;; 46 ;;
50 47
51 remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) 48remove | upgrade | failed-upgrade | abort-install | abort-upgrade | disappear)
52 49
53 if $_LIBNSSWITCH 50 if $_LIBNSSWITCH; then
54 then 51 rm -rf /usr/lib/x86_64-linux-gnu/usr/libnss_gns.so.2
55 rm -rf /usr/lib/x86_64-linux-gnu/usr/libnss_gns.so.2 52 rm -rf /usr/lib/x86_64-linux-gnu/usr/libnss_gns4.so.2
56 rm -rf /usr/lib/x86_64-linux-gnu/usr/libnss_gns4.so.2 53 rm -rf /usr/lib/x86_64-linux-gnu/usr/libnss_gns6.so.2
57 rm -rf /usr/lib/x86_64-linux-gnu/usr/libnss_gns6.so.2 54 remove_gns
58 remove_gns 55 fi
59 fi
60 56
61 ;; 57 ;;
62 58
63 *) 59*)
64 echo "postrm called with unknown argument \`${1}'" >&2 60 echo "postrm called with unknown argument \`${1}'" >&2
65 exit 1 61 exit 1
66 ;; 62 ;;
67esac 63esac
68 64
69#DEBHELPER# 65#DEBHELPER#