void-packages/srcpkgs/xbps-triggers/files/hwdb.d-dir
James Barnett 90b5c612ae Add hook and trigger to handle hwdb.d files
Adds a hook to check if /usr/lib/udev/hwdb.d is being modified. If so,
triggers 'udevadm hwdb --root=. --update'.

Closes: #9858 [via git-merge-pr]
2018-01-15 14:31:12 +01:00

29 lines
370 B
Bash
Executable file

#!/bin/sh
#
# Updates hardware database
#
# Arguments: $ACTION = [run/targets]
# $TARGET = [post-install/pre-remove]
# $PKGNAME
# $VERSION
# $UPDATE = [yes/no]
#
ACTION="$1"
TARGET="$2"
PKGNAME="$3"
VERSION="$4"
UPDATE="$5"
case "$ACTION" in
targets)
echo "post-install pre-remove"
;;
run)
usr/bin/udevadm hwdb --root=. --update
;;
*)
exit 1
;;
esac
exit 0