summaryrefslogtreecommitdiff
path: root/rules/gentoo/30-kernel-compat.rules
blob: 95da1522d32cd705a4fc20bc4c2bee567b3fc0b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# do not edit this file, it will be overwritten on update

ACTION!="add|change", GOTO="kernel_compat_end"

#
# naming device rules
#

# dvb device naming
# needed for kernels <2.6.29-rc1
SUBSYSTEM=="dvb", ENV{DVB_ADAPTER_NUM}=="", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", NAME="%c", GROUP="video"

#
# module loading rules
#
ACTION!="add", GOTO="kernel_compat_end"

# No need for more code, as MODALIAS is present
ENV{MODALIAS}=="?*", GOTO="kernel_compat_end"

# needed for kernel <2.6.30-rc1
SUBSYSTEM=="scsi", ATTR{type}=="8", RUN+="/sbin/modprobe -b ch"

# needed for kernel <2.6.27-rc5
# acpi will do on newer kernels
SUBSYSTEM=="pnp", DRIVER!="?*", \
  RUN{ignore_error}+="/bin/sh -c '/sbin/modprobe -a $$(while read id; do echo pnp:d$$id; done < /sys$devpath/id)'"