Systemd/rules/gentoo/30-kernel-compat.rules
2009-06-16 00:44:39 +02:00

30 lines
847 B
Plaintext

# 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"