osi-tools/abs/notsystemd/udev-hook

19 lines
331 B
Plaintext
Raw Normal View History

2018-07-26 22:26:45 +00:00
#!/bin/sh -e
udevd_live() {
if [ ! -d /run/udev ]; then
echo >&2 " Skipped: Device manager is not running."
exit 0
fi
}
case $1 in
hwdb) /usr/bin/systemd-hwdb --usr update ;;
udev-reload) udevd_live; /usr/bin/udevadm control --reload ;;
*) echo >&2 " Invalid operation '$1'"; exit 1 ;;
esac
exit 0