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