move device managers to hooks

This commit is contained in:
illiliti
2020-07-27 11:32:22 +03:00
parent 32a38b17a5
commit 5eae5cd6a9
18 changed files with 237 additions and 125 deletions

19
hooks/mdev/mdev.init Normal file
View File

@ -0,0 +1,19 @@
# vim: set ft=sh:
# shellcheck shell=sh
#
# false positive
# shellcheck disable=2154,2034
#
# run_mdev()
{
[ "$break" = devmgr ] && { print "break before run_mdev()"; sh; }
mdev -s
mdev -df 2> /dev/null & mdev_pid="$!"
find /sys/devices -name uevent |
while read -r uevent; do
printf add > "$uevent"
done 2> /dev/null
}