udev-hook 331 B

12345678910111213141516171819
  1. #!/bin/sh -e
  2. udevd_live() {
  3. if [ ! -d /run/udev ]; then
  4. echo >&2 " Skipped: Device manager is not running."
  5. exit 0
  6. fi
  7. }
  8. case $1 in
  9. hwdb) /usr/bin/systemd-hwdb --usr update ;;
  10. udev-reload) udevd_live; /usr/bin/udevadm control --reload ;;
  11. *) echo >&2 " Invalid operation '$1'"; exit 1 ;;
  12. esac
  13. exit 0