summaryrefslogtreecommitdiff
path: root/debian/trousers.preinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/trousers.preinst')
-rw-r--r--debian/trousers.preinst15
1 files changed, 15 insertions, 0 deletions
diff --git a/debian/trousers.preinst b/debian/trousers.preinst
new file mode 100644
index 0000000..83d3cb6
--- /dev/null
+++ b/debian/trousers.preinst
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = install ] || [ "$1" = upgrade ]; then
+ if [ -e "/etc/udev/rules.d/45-trousers.rules" ]; then
+ if [ "`md5sum \"/etc/udev/rules.d/45-trousers.rules\" | sed -e \"s/ .*//\"`" = \
+ "`dpkg-query -W -f='${Conffiles}' trousers | sed -n -e \"\\\\' /etc/udev/rules.d/45-trousers.rules '{s/ obsolete$//;s/.* //p}\"`" ]
+ then
+ rm -f "/etc/udev/rules.d/45-trousers.rules"
+ fi
+ fi
+fi
+
+#DEBHELPER#