# /etc/udev/rules/30-kernel-compat.rules: kernel compat rules for udev # $Header: /root/magellan-cvs/src/udev/udev-kernel-compat.rules.magellan,v 1.3 2009-10-13 10:46:20 niro Exp $ # # There are a number of modifiers that are allowed to be used in some # of the different fields. They provide the following subsitutions: # %n - the "kernel number" of the device. # For example, 'sda3' has a "kernel number" of '3' # %k - the kernel name for the device. # %M - the kernel major number for the device # %m - the kernel minor number for the device # %b - the bus id for the device # %c - the string returned by the PROGRAM. (Note, this doesn't work within # the PROGRAM field for the obvious reason.) # %s{filename} - the content of a sysfs attribute. # %% - the '%' char itself. # # Try not to modify this file, if you wish to change things, create a new rule # file that can be run before this one. # 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" SUBSYSTEM=="mmc", RUN+="modprobe.sh -b mmc_block" # needed for kernel <2.6.27-rc5 # acpi will do on newer kernels SUBSYSTEM=="pnp", DRIVER!="?*", \ RUN{ignore_error}+="/bin/sh -c 'modprobe.sh -a $$(while read id; do echo pnp:d$$id; done < /sys$devpath/id)'" LABEL="kernel_compat_end"