*: refactor
Documentation will be rewritten and added later.
This commit is contained in:
15
hook/systemd-udev/systemd-udev
Normal file
15
hook/systemd-udev/systemd-udev
Normal file
@ -0,0 +1,15 @@
|
||||
# vim: set ft=sh:
|
||||
# shellcheck shell=sh
|
||||
#
|
||||
# https://shellcheck.net/wiki/SC2154
|
||||
# shellcheck disable=2154
|
||||
|
||||
for _bin in /lib/systemd/systemd-udevd udevadm; do
|
||||
copy_exec "$_bin"
|
||||
done
|
||||
|
||||
mkdir -p "${tmpdir}/lib/udev/rules.d"
|
||||
cat > "${tmpdir}/lib/udev/rules.d/device.rules" << EOF
|
||||
SUBSYSTEMS=="block", ACTION=="add", RUN+="/sbin/helper"
|
||||
ENV{MODALIAS}=="?*", ACTION=="add", RUN+="/sbin/helper"
|
||||
EOF
|
10
hook/systemd-udev/systemd-udev.init
Normal file
10
hook/systemd-udev/systemd-udev.init
Normal file
@ -0,0 +1,10 @@
|
||||
# vim: set ft=sh:
|
||||
# shellcheck shell=sh
|
||||
#
|
||||
# https://shellcheck.net/wiki/SC2154
|
||||
# shellcheck disable=2154
|
||||
|
||||
systemd-udevd -dN never
|
||||
udevadm trigger -c add -t subsystems
|
||||
udevadm trigger -c add -t devices
|
||||
udevadm settle
|
4
hook/systemd-udev/systemd-udev.init.late
Normal file
4
hook/systemd-udev/systemd-udev.init.late
Normal file
@ -0,0 +1,4 @@
|
||||
# vim: set ft=sh:
|
||||
# shellcheck shell=sh
|
||||
|
||||
udevadm control -e
|
Reference in New Issue
Block a user