diff options
author | David P <megver83@parabola.nu> | 2019-11-13 16:21:17 -0300 |
---|---|---|
committer | David P <megver83@parabola.nu> | 2019-11-13 16:21:17 -0300 |
commit | e248e462fc0dc8b520ed9c55d2ac37a77b5eaa9a (patch) | |
tree | 4b7ee322f85a89f1a63cefb607cdc22b60ba4bd5 /nonsystemd/eudev/udev-hook | |
parent | d94a8ccae66c35c65aaeba35bec8d585c0758f6f (diff) | |
download | abslibre-e248e462fc0dc8b520ed9c55d2ac37a77b5eaa9a.tar.gz abslibre-e248e462fc0dc8b520ed9c55d2ac37a77b5eaa9a.tar.bz2 abslibre-e248e462fc0dc8b520ed9c55d2ac37a77b5eaa9a.zip |
addpkg: nonsystemd/eudev 3.2.9-1
Signed-off-by: David P <megver83@parabola.nu>
Diffstat (limited to 'nonsystemd/eudev/udev-hook')
-rw-r--r-- | nonsystemd/eudev/udev-hook | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/nonsystemd/eudev/udev-hook b/nonsystemd/eudev/udev-hook new file mode 100644 index 000000000..d9c793f45 --- /dev/null +++ b/nonsystemd/eudev/udev-hook @@ -0,0 +1,16 @@ +#!/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/udevadm hwdb --update ;; + udev-reload) udevd_live; /usr/bin/udevadm control --reload ;; + *) echo >&2 " Invalid operation '$1'"; exit 1 ;; +esac + +exit 0 |