1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 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