*: refactor
Documentation will be rewritten and added later.
This commit is contained in:
14
hook/mdevd/mdevd
Normal file
14
hook/mdevd/mdevd
Normal file
@ -0,0 +1,14 @@
|
||||
# vim: set ft=sh:
|
||||
# shellcheck shell=sh
|
||||
#
|
||||
# https://shellcheck.net/wiki/SC2154
|
||||
# shellcheck disable=2154
|
||||
|
||||
for _bin in mdevd mdevd-coldplug kill; do
|
||||
copy_exec "$_bin"
|
||||
done
|
||||
|
||||
cat > "${tmpdir}/etc/mdev.conf" << EOF
|
||||
SUBSYSTEM=block;.* 0:0 660 @/sbin/helper
|
||||
\$MODALIAS=.* 0:0 660 @/sbin/helper
|
||||
EOF
|
13
hook/mdevd/mdevd.init
Normal file
13
hook/mdevd/mdevd.init
Normal file
@ -0,0 +1,13 @@
|
||||
# vim: set ft=sh:
|
||||
# shellcheck shell=sh
|
||||
#
|
||||
# https://shellcheck.net/wiki/SC2154
|
||||
# shellcheck disable=2154
|
||||
|
||||
mdevd 2> /dev/null &
|
||||
|
||||
# https://shellcheck.net/wiki/SC2034
|
||||
# shellcheck disable=2034
|
||||
mdevd_pid=$!
|
||||
|
||||
mdevd-coldplug
|
7
hook/mdevd/mdevd.init.late
Normal file
7
hook/mdevd/mdevd.init.late
Normal file
@ -0,0 +1,7 @@
|
||||
# vim: set ft=sh:
|
||||
# shellcheck shell=sh
|
||||
#
|
||||
# https://shellcheck.net/wiki/SC2154
|
||||
# shellcheck disable=2154
|
||||
|
||||
kill "$mdevd_pid"
|
Reference in New Issue
Block a user