summaryrefslogtreecommitdiffstats
path: root/debian/udev.postinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/udev.postinst')
-rw-r--r--debian/udev.postinst25
1 files changed, 25 insertions, 0 deletions
diff --git a/debian/udev.postinst b/debian/udev.postinst
new file mode 100644
index 0000000..9215d3f
--- /dev/null
+++ b/debian/udev.postinst
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+set -e
+
+update_hwdb() {
+ systemd-hwdb --usr update || true
+}
+
+case "$1" in
+ configure)
+ # update/create hwdb before we (re)start udev
+ update_hwdb
+
+ if dpkg --compare-versions "$2" lt-nl "254.3-1~" && [ ! -f /etc/init.d/udev ]; then
+ update-rc.d udev remove || true
+ fi
+ ;;
+
+ triggered)
+ update_hwdb
+ exit 0
+ ;;
+esac
+
+#DEBHELPER#