File: libchipcard-tools.postinst

package info (click to toggle)
libchipcard 5.0.3beta-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,384 kB
  • sloc: ansic: 20,920; sh: 11,062; xml: 6,709; makefile: 595; cpp: 448
file content (35 lines) | stat: -rw-r--r-- 712 bytes parent folder | download | duplicates (4)
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
#! /bin/sh

set -e

case "$1" in
    configure)

	# are we upgrading from libchipcard prior to 4.99?
	if dpkg --compare-versions "$2" lt 4.99 && ! test -z "$2" ; then
            rm -f /var/run/chipcard/chipcard.comm
	    rm -f /var/run/chipcard/chipcardd4.pid
	    if [ -d /var/run/chipcard ]; then
                rmdir /var/run/chipcard
	    fi
	    update-rc.d -f libchipcard-tools remove > /dev/null
	fi

    ;;

    abort-upgrade|abort-remove|abort-deconfigure)

    ;;

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

# Remove obsolete config file
dpkg-maintscript-helper rm_conffile /etc/init.d/libchipcard-tools 5.0.3beta-2 -- "$@"

#DEBHELPER#

exit 0