udev-hook 325 B

1234567891011121314151617
  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/udevadm hwdb --update ;;
  10. udev-reload) udevd_live; /usr/bin/udevadm control --reload ;;
  11. *) echo >&2 " Invalid operation '$1'"; exit 1 ;;
  12. esac
  13. exit 0