diff options
author | Laurent Bercot <ska-devel@skarnet.org> | 2022-08-09 12:10:36 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2022-11-08 15:10:59 +0000 |
commit | fe1d66651a552bba62267aaac8d0c89b383d132b (patch) | |
tree | e612f7adba30ba0aef3599c871ef778579847620 /setup-devd.in | |
parent | 0dbc1ceaf4df17423a3030e5aed407335a6cd65b (diff) | |
download | alpine-conf-fe1d66651a552bba62267aaac8d0c89b383d132b.zip |
setup-devd: also add hwdrivers for mdevd
The hwdriver service is currently activated for mdev and deactivated
when mdev is disabled. Since mdevd and mdev use (more or less) the
same mechanism, we also enable hwdrivers with mdevd.
The service is only started when a coldplug is required, because
if no coldplug is required, the appropriate kernel modules are
already loaded.
Note that with the MODALIAS line in /etc/mdev.conf, it is possible
that the hwdrivers service is entirely redundant. This would need
some additional testing.
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'setup-devd.in')
-rw-r--r-- | setup-devd.in | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/setup-devd.in b/setup-devd.in index da42a49..0695832 100644 --- a/setup-devd.in +++ b/setup-devd.in @@ -47,7 +47,9 @@ enable_mdev () { disable_mdevd () { if rc-service --exists mdevd ; then + rc-service --ifstarted --quiet hwdrivers stop rc-service --ifstarted --quiet mdevd stop + rc-update delete --quiet hwdriver sysinit || : rc-update delete --quiet mdevd-init sysinit 2>/dev/null || : rc-update delete --quiet mdevd sysinit 2>/dev/null || : fi @@ -57,9 +59,11 @@ enable_mdevd () { $MOCK apk add --quiet mdevd mdevd-openrc rc-update add --quiet mdevd sysinit rc-update add --quiet mdevd-init sysinit + rc-update add --quiet hwdrivers sysinit rc-service --ifstopped mdevd start if "$1" ; then rc-service mdevd-init start + rc-service hwdrivers --ifstopped start fi } |