File: xserver-xorg-input-wacom.postinst

package info (click to toggle)
xf86-input-wacom 1.2.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,760 kB
  • sloc: ansic: 12,319; sh: 4,476; python: 517; makefile: 145; xml: 15
file content (22 lines) | stat: -rw-r--r-- 550 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
set -e

# dh_installudev left this orphaned when the udev rules location changed,
# so remove it now if it remains unchanged by the local admin.  See #565126.

OLD_RULES=/etc/udev/rules.d/z60_xserver-xorg-input-wacom.rules

if [ -f $OLD_RULES ];
then
    OLD_HASH=$(dpkg-query -W -f='${Conffiles}' xserver-xorg-input-wacom 2>/dev/null |
               awk '$1 == "'$OLD_RULES'" { print $2 }')

    if [ -n "$OLD_HASH" ] && [ "$(md5sum $OLD_RULES | cut -d' ' -f1)" = "$OLD_HASH" ];
    then
        rm -f $OLD_RULES
    fi
fi


#DEBHELPER#