move device managers to hooks
This commit is contained in:
22
hooks/mdevd/mdevd
Normal file
22
hooks/mdevd/mdevd
Normal file
@ -0,0 +1,22 @@
|
||||
# vim: set ft=sh:
|
||||
# shellcheck shell=sh
|
||||
#
|
||||
# false positive
|
||||
# shellcheck disable=2154,2016
|
||||
#
|
||||
# handle_mdevd()
|
||||
{
|
||||
print "configuring mdevd"
|
||||
|
||||
for _binary in mdevd mdevd-coldplug; do
|
||||
copy_binary "$_binary"
|
||||
done
|
||||
|
||||
printf "%s\n" \
|
||||
'SUBSYSTEM=block;.* 0:0 660 @device-helper' \
|
||||
> "${tmpdir}/etc/mdev.conf"
|
||||
|
||||
[ "$monolith" = 1 ] || printf "%s\n" \
|
||||
'$MODALIAS=.* 0:0 660 @modprobe "$MODALIAS"' \
|
||||
>> "${tmpdir}/etc/mdev.conf"
|
||||
}
|
Reference in New Issue
Block a user