summaryrefslogtreecommitdiffstats
path: root/debian/udev.postinst
blob: 9215d3f5b9c6d31b67a65995483e5d9cbb1d8cd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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#