File: open-isns-discoveryd.postrm

package info (click to toggle)
open-isns 0.101-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 2,420 kB
  • sloc: ansic: 19,981; sh: 3,211; python: 1,083; perl: 839; makefile: 214
file content (46 lines) | stat: -rw-r--r-- 1,261 bytes parent folder | download | duplicates (6)
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
#!/bin/sh
# postrm script for open-isns-discoveryd

. /usr/share/debconf/confmodule

set -e

case "$1" in
    purge)
        if [ -f /etc/isns/auth_key ] ; then
            db_reset open-isns-discoveryd/purge-auth-key || true
            db_input critical open-isns-discoveryd/purge-auth-key || true
            db_go || true
            RET=""
            db_get open-isns-discoveryd/purge-auth-key || true
            if [ x"$RET" != x"false" ] ; then
                rm -f /etc/isns/auth_key
            fi
        fi
        if [ -f /etc/isns/server_key.pub ] ; then
            db_reset open-isns-discoveryd/purge-server-key-pub || true
            db_input critical open-isns-discoveryd/purge-server-key-pub || true
            db_go || true
            RET=""
            db_get open-isns-discoveryd/purge-server-key-pub || true
            if [ x"$RET" != x"false" ] ; then
                rm -f /etc/isns/server_key.pub
            fi
        fi
        if [ -d /etc/isns ] ; then
            rmdir --ignore-fail-on-non-empty /etc/isns
        fi
    ;;

    remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
    ;;

    *)
        echo "postrm called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

#DEBHELPER#

exit 0