mirror of
https://github.com/xHyroM/void-packages.git
synced 2024-11-22 14:41:04 +01:00
37 lines
474 B
Text
37 lines
474 B
Text
|
#!/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"
|
||
|
|
||
|
udevadm=usr/bin/udevadm
|
||
|
|
||
|
case "$ACTION" in
|
||
|
targets)
|
||
|
echo "post-install pre-remove"
|
||
|
;;
|
||
|
run)
|
||
|
if [ ! -x $udevadm ]; then
|
||
|
exit 0
|
||
|
fi
|
||
|
|
||
|
echo "Updating udev hardware database ..."
|
||
|
$udevadm hwdb --root=. --update
|
||
|
;;
|
||
|
*)
|
||
|
exit 1
|
||
|
;;
|
||
|
esac
|
||
|
|
||
|
exit 0
|