Debian Codegraph @

debian/libticables2-8.postinst

raw
1 #!/bin/sh
2
3 set -e
4
5 case "$1" in
6 configure)
7 if [ "$(uname -s)" = "Linux" ]; then
8 # install the udev file only once:
9 # - the first time the package is installed
10 # OR - the first time the package is upgraded from a version earlier than 3.9.6-2
11 if [ -z "$2" ] || dpkg --compare-versions "$2" lt 3.9.6-2; then
12 rm -f /etc/udev/rules.d/025_libticables.rules
13 rm -f /etc/udev/rules.d/025_ticables.rules
14 fi
15
16 if [ -f /etc/hotplug/usb/tiglusb ]; then
17 rm -f /etc/hotplug/usb/tiglusb
18 fi
19
20 if [ -f /etc/hotplug/usb/libticables.usermap ]; then
21 rm -f /etc/hotplug/usb/libticables.usermap
22 fi
23 fi
24
25 # begin-remove-after: released:forky
26 # protective diversion of files moved from / to /usr, to avoid file loss.
27 # Only for upgrades.
28 # At this point, the package will have installed the same file in /usr.
29 dpkg-divert --package usr-is-merged --no-rename \
30 --divert /lib/udev/rules.d/69-libticables2-8.rules.usr-is-merged \
31 --remove /lib/udev/rules.d/69-libticables2-8.rules
32 # end-remove-after
33 ;;
34
35 abort-upgrade|abort-remove|abort-deconfigure)
36 ;;
37
38 *)
39 echo "$0 called with unknown argument '$1'" >&2
40 exit 1
41 ;;
42 esac
43
44 #DEBHELPER#