summaryrefslogtreecommitdiff
path: root/rules/gentoo/30-kernel-compat.rules
blob: bf54e334235337c358cc7982ba0388052a0762da (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
29
# 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)'"

LABEL="kernel_compat_end"