diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2018-07-11 20:51:57 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2018-07-12 13:44:16 -0400 |
commit | 62a9de5139e9bbb95bee801146a61a90fce32510 (patch) | |
tree | 7d4c0764bf4fd1f24ad0609a93b25e654eb7d4d3 /libre/systemd/udev-hook | |
parent | e24826c36a7f851a3b92656b35975caa1a62ae47 (diff) | |
download | abslibre-62a9de5139e9bbb95bee801146a61a90fce32510.tar.gz abslibre-62a9de5139e9bbb95bee801146a61a90fce32510.tar.bz2 abslibre-62a9de5139e9bbb95bee801146a61a90fce32510.zip |
libre/systemd: Split udev off in to a separate package
Diffstat (limited to 'libre/systemd/udev-hook')
-rw-r--r-- | libre/systemd/udev-hook | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libre/systemd/udev-hook b/libre/systemd/udev-hook new file mode 100644 index 000000000..61d853293 --- /dev/null +++ b/libre/systemd/udev-hook @@ -0,0 +1,18 @@ +#!/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 |