File: libsane-extras.postinst

package info (click to toggle)
sane-backends-extras 1.0.18.5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 4,084 kB
  • ctags: 5,098
  • sloc: ansic: 55,380; sh: 7,990; makefile: 996
file content (28 lines) | stat: -rw-r--r-- 678 bytes parent folder | download
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
#!/bin/sh

case "$1" in
    configure)
    if [ "$(uname -s)" = "Linux" ]; then
	if [ -e /etc/hotplug/usb/libsane-extras.usermap ]; then
	    rm -f /etc/hotplug/usb/libsane-extras.usermap
	fi

	# install the udev file only once:
	#    - the first time the package is installed
	# OR - the first time the package is upgraded from a version earlier than 1.0.16.7
	if [ -z "$2" ] || dpkg --compare-versions "$2" lt 1.0.16.7; then
	    ln -sf ../libsane-extras.rules /etc/udev/rules.d/025_libsane-extras.rules
	fi
    fi
    ;;

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

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

#DEBHELPER#