2004-01-01 07:28:15 +03:00
# /etc/udev/udev.rules: device naming rules for udev
2004-03-30 06:38:53 +04:00
#
# Gentoo specific rules, based a bit on devfs rules, but much simpler.
2004-01-01 07:28:15 +03:00
#
2004-02-20 04:55:17 +03:00
# There are a number of modifiers that are allowed to be used in some of the
# fields. See the udev man page for a full description of them.
2004-01-01 07:28:15 +03:00
###########################################################
#
# For devfs similar /dev layout (neater)
#
###########################################################
2004-11-11 05:46:01 +03:00
# cdrom symlinks and other good cdrom naming
2004-12-19 00:57:49 +03:00
BUS="ide", KERNEL="hd[a-z]", PROGRAM="/etc/udev/scripts/cdsymlinks.sh %k", SYMLINK="%c{1} %c{2} %c{3} %c{4} %c{5} %c{6}"
BUS="scsi", KERNEL="sr[0-9]*", PROGRAM="/etc/udev/scripts/cdsymlinks.sh %k", SYMLINK="%c{1} %c{2} %c{3} %c{4} %c{5} %c{6}"
2004-11-11 05:46:01 +03:00
BUS="scsi", KERNEL="scd[a-z]", PROGRAM="/etc/udev/scripts/cdsymlinks.sh %k", SYMLINK="%c{1} %c{2} %c{3} %c{4} %c{5} %c{6}"
2004-01-01 07:28:15 +03:00
# devfs-names for ide-devices (uncomment only one)
# /dev/ide/.../{disc,cd} and /dev/{cdroms,discs}/* type names
2004-12-20 05:04:11 +03:00
BUS="ide", KERNEL="hd*", PROGRAM="/etc/udev/scripts/ide-devfs.sh %k %b %n", NAME="%k", SYMLINK="%c{1} %c{2}", GROUP="%c{3}"
2004-12-18 14:22:16 +03:00
# disk devices
2004-12-20 05:04:11 +03:00
KERNEL="sd*", NAME="%k", GROUP="disk"
KERNEL="dasd*", NAME="%k", GROUP="disk"
KERNEL="ataraid*", NAME="%k", GROUP="disk"
2004-02-20 04:55:17 +03:00
2004-11-18 06:10:07 +03:00
# dri devices
2004-12-20 05:04:11 +03:00
KERNEL="card*", NAME="dri/card%n", GROUP="video"
KERNEL="nvidia*", NAME="%k", GROUP="video"
KERNEL="3dfx*", NAME="%k", GROUP="video"
2004-03-30 06:38:53 +04:00
2004-02-20 04:55:17 +03:00
# alsa devices
2004-12-19 00:57:49 +03:00
KERNEL="controlC[0-9]*", NAME="snd/%k"
KERNEL="hw[CD0-9]*", NAME="snd/%k"
KERNEL="pcm[CD0-9cp]*", NAME="snd/%k"
KERNEL="midiC[D0-9]*", NAME="snd/%k"
KERNEL="timer", NAME="snd/%k"
KERNEL="seq", NAME="snd/%k"
2004-11-18 06:10:07 +03:00
# capi devices
KERNEL="capi", NAME="capi20", SYMLINK="isdn/capi20"
KERNEL="capi*", NAME="capi/%n"
# cpu devices
KERNEL="cpu[0-9]*", NAME="cpu/%n/cpuid"
KERNEL="msr[0-9]*", NAME="cpu/%n/msr"
KERNEL="microcode", NAME="cpu/microcode"
2004-02-20 04:55:17 +03:00
# dm devices (ignore them)
2004-11-18 06:10:07 +03:00
KERNEL="dm-[0-9]*", NAME=""
2004-03-03 07:23:36 +03:00
# create a symlink named after the device map name
# note devmap_name comes with extras/multipath
2004-11-18 06:10:07 +03:00
#KERNEL="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK="%c"
KERNEL="device-mapper", NAME="mapper/control"
2004-02-20 04:55:17 +03:00
2004-01-01 07:28:15 +03:00
# fb devices
2004-11-18 06:10:07 +03:00
KERNEL="fb[0-9]*", NAME="fb/%n", SYMLINK="%k"
2004-01-01 07:28:15 +03:00
2004-02-20 04:55:17 +03:00
# floppy devices
2004-12-20 05:04:11 +03:00
KERNEL="fd[0-9]*", NAME="floppy/%n", SYMLINK="%k", GROUP="floppy"
2004-02-20 04:55:17 +03:00
# i2c devices
2004-11-18 06:10:07 +03:00
KERNEL="i2c-[0-9]*", NAME="i2c/%n", SYMLINK="%k"
2004-02-20 04:55:17 +03:00
# input devices
2004-12-18 14:22:16 +03:00
KERNEL="mice", NAME="input/%k", MODE="0644"
KERNEL="mouse*", NAME="input/%k", MODE="0644"
KERNEL="event*", NAME="input/%k", MODE="0600"
KERNEL="js*", NAME="input/%k", MODE="664"
KERNEL="ts*", NAME="input/%k", MODE="0600"
2004-02-20 04:55:17 +03:00
2004-01-01 07:28:15 +03:00
# loop devices
2004-12-20 05:04:11 +03:00
KERNEL="loop[0-9]*", NAME="loop/%n", SYMLINK="%k", GROUP="disk"
2004-01-01 07:28:15 +03:00
# md block devices
2004-12-20 05:04:11 +03:00
KERNEL="md[0-9]*", NAME="md/%n", SYMLINK="%k", GROUP="disk"
2004-01-01 07:28:15 +03:00
2005-01-12 18:38:49 +03:00
# aoe char devices,
# we might have to add a "CLASS" type one of these days to make this a bit saner
KERNEL="discover", NAME="etherd/%k", GROUP="disk", MODE="0220"
KERNEL="err", NAME="etherd/%k", GROUP="disk", MODE="0440"
KERNEL="interfaces", NAME="etherd/%k", GROUP="disk", MODE="0220"
# aoe block devices
KERNEL="etherd*", NAME="%k", GROUP="disk"
2004-02-20 04:55:17 +03:00
# misc devices
2004-11-18 06:10:07 +03:00
KERNEL="agpgart", NAME="misc/%k", SYMLINK="%k"
KERNEL="psaux", NAME="misc/%k", SYMLINK="%k"
2004-12-18 14:22:16 +03:00
KERNEL="rtc", NAME="misc/%k", SYMLINK="%k", MODE="0664"
2004-11-18 06:10:07 +03:00
KERNEL="uinput", NAME="misc/%k", SYMLINK="%k"
2004-12-18 14:22:16 +03:00
KERNEL="inotify", NAME="misc/%k", SYMLINK="%k", MODE="0666"
2004-03-30 07:52:56 +04:00
# netlink devices
KERNEL="route", NAME="netlink/%k"
KERNEL="skip", NAME="netlink/%k"
KERNEL="usersock", NAME="netlink/%k"
KERNEL="fwmonitor", NAME="netlink/%k"
KERNEL="tcpdiag", NAME="netlink/%k"
KERNEL="nflog", NAME="netlink/%k"
KERNEL="xfrm", NAME="netlink/%k"
KERNEL="arpd", NAME="netlink/%k"
KERNEL="route6", NAME="netlink/%k"
KERNEL="ip6_fw", NAME="netlink/%k"
KERNEL="dnrtmsg", NAME="netlink/%k"
KERNEL="tap*", NAME="netlink/%k"
2004-04-13 11:43:14 +04:00
2004-11-18 06:10:07 +03:00
# network devices
2004-04-22 04:43:17 +04:00
KERNEL="tun", NAME="net/%k"
2004-11-18 06:10:07 +03:00
# ramdisk devices
KERNEL="ram[0-9]*", NAME="rd/%n", SYMLINK="%k"
2004-04-22 04:43:17 +04:00
# raw devices
2004-12-20 05:04:11 +03:00
KERNEL="raw[0-9]*", NAME="raw/%k", GROUP="disk"
KERNEL="ram*", NAME="%k", GROUP="disk"
2004-11-18 06:10:07 +03:00
# sound devices
2004-12-20 05:04:11 +03:00
KERNEL="adsp", NAME="sound/%k", SYMLINK="%k", GROUP="audio"
KERNEL="adsp[0-9]*", NAME="sound/%k", SYMLINK="%k", GROUP="audio"
KERNEL="audio", NAME="sound/%k", SYMLINK="%k", GROUP="audio"
KERNEL="audio[0-9]*", NAME="sound/%k", SYMLINK="%k", GROUP="audio"
KERNEL="dsp", NAME="sound/%k", SYMLINK="%k", GROUP="audio"
KERNEL="dsp[0-9]*", NAME="sound/%k", SYMLINK="%k", GROUP="audio"
KERNEL="mixer", NAME="sound/%k", SYMLINK="%k", GROUP="audio"
KERNEL="mixer[0-9]*", NAME="sound/%k", SYMLINK="%k", GROUP="audio"
KERNEL="sequencer", NAME="sound/%k", SYMLINK="%k", GROUP="audio"
KERNEL="sequencer[0-9]*", NAME="sound/%k", SYMLINK="%k", GROUP="audio"
2004-11-18 06:10:07 +03:00
# tty devices
2004-12-18 14:22:16 +03:00
KERNEL="console", NAME="%k", GROUP="tty", MODE="0600"
KERNEL="tty", NAME="%k", GROUP="tty", MODE="0666"
2004-12-20 05:04:11 +03:00
KERNEL="tty[0-9]*", NAME="vc/%n", SYMLINK="%k", GROUP="tty"
KERNEL="ttyS[0-9]*", NAME="tts/%n", SYMLINK="%k", GROUP="tty"
2004-12-18 14:22:16 +03:00
KERNEL="ttyUSB[0-9]*", NAME="tts/USB%n", GROUP="tty", MODE="0600"
2004-12-20 05:04:11 +03:00
KERNEL="ippp0", NAME="%k", GROUP="tty"
KERNEL="isdn*", NAME="%k", GROUP="tty"
KERNEL="dcbri*", NAME="%k", GROUP="tty"
KERNEL="ircomm*", NAME="%k", GROUP="tty"
2004-12-18 14:22:16 +03:00
# pty devices
KERNEL="ptmx", NAME="%k", GROUP="tty", MODE="0666"
2004-12-20 05:04:11 +03:00
KERNEL="pty[p-za-e][0-9a-f]*", NAME="pty/m%n", SYMLINK="%k", GROUP="tty"
KERNEL="tty[p-za-e][0-9a-f]*", NAME="pty/s%n", SYMLINK="%k", GROUP="tty"
2004-12-18 14:22:16 +03:00
# vc devices
2004-12-20 05:04:11 +03:00
KERNEL="vcs", NAME="vcc/0", SYMLINK="%k", GROUP="tty"
KERNEL="vcs[0-9]*", NAME="vcc/%n", SYMLINK="%k", GROUP="tty"
KERNEL="vcsa", NAME="vcc/a0", SYMLINK="%k", GROUP="tty"
KERNEL="vcsa[0-9]*", NAME="vcc/a%n", SYMLINK="%k", GROUP="tty"
2004-12-18 14:22:16 +03:00
2004-12-19 00:57:49 +03:00
# memory devices
KERNEL="random", NAME="%k", MODE="0666"
KERNEL="urandom", NAME="%k", MODE="0444"
KERNEL="mem", NAME="%k", MODE="0640"
KERNEL="kmem", NAME="%k", MODE="0640"
KERNEL="port", NAME="%k", MODE="0640"
KERNEL="full", NAME="%k", MODE="0666"
KERNEL="null", NAME="%k", MODE="0666"
KERNEL="zero", NAME="%k", MODE="0666"
2004-11-18 06:10:07 +03:00
# usb devices
KERNEL="hiddev*", NAME="usb/%k"
KERNEL="auer*", NAME="usb/%k"
2004-12-20 05:04:11 +03:00
KERNEL="legousbtower*", NAME="usb/%k", GROUP="usb"
2004-11-18 06:10:07 +03:00
KERNEL="dabusb*", NAME="usb/%k"
2004-12-20 05:04:11 +03:00
BUS="usb", KERNEL="lp[0-9]*", NAME="usb/%k", GROUP="lp"
2004-11-18 06:10:07 +03:00
# v4l devices
2004-12-20 05:04:11 +03:00
KERNEL="video[0-9]*", NAME="v4l/video%n", SYMLINK="video%n", GROUP="video"
KERNEL="radio[0-9]*", NAME="v4l/radio%n", GROUP="video"
KERNEL="vbi[0-9]*", NAME="v4l/vbi%n", SYMLINK="vbi%n", GROUP="video"
KERNEL="vtx[0-9]*", NAME="v4l/vtx%n", GROUP="video"
2004-09-05 19:53:11 +04:00
2004-12-09 03:55:27 +03:00
# Asterix Zaptel devices
KERNEL="zapctl", NAME="zap/ctl"
KERNEL="zaptimer", NAME="zap/timer"
KERNEL="zapchannel", NAME="zap/channel"
KERNEL="zappseudo", NAME="zap/pseudo"
KERNEL="zap[0-9]*", NAME="zap/%n"
2004-12-18 14:22:16 +03:00
# pilot/palm devices
2004-12-20 05:04:11 +03:00
KERNEL="pilot", NAME="%k", GROUP="uucp"
2004-12-19 00:57:49 +03:00
2004-12-18 14:22:16 +03:00
# jaz devices
2004-12-20 05:04:11 +03:00
KERNEL="jaz*", NAME="%k", GROUP="disk"
2004-12-19 00:57:49 +03:00
2004-12-18 14:22:16 +03:00
# zip devices
2004-12-20 05:04:11 +03:00
KERNEL="pocketzip*", NAME="%k", GROUP="disk"
KERNEL="zip*", NAME="%k", GROUP="disk"
2004-12-18 14:22:16 +03:00
# ls120 devices
2004-12-20 05:04:11 +03:00
KERNEL="ls120", NAME="%k", GROUP="disk"
2004-12-18 14:22:16 +03:00
# lp devices
2004-12-20 05:04:11 +03:00
KERNEL="lp*", NAME="%k", GROUP="lp"
KERNEL="irlpt", NAME="%k", GROUP="lp"
KERNEL="usblp", NAME="%k", GROUP="lp"
KERNEL="lp*", NAME="%k", GROUP="lp"
2004-12-18 14:22:16 +03:00
# tape devices
2004-12-20 05:04:11 +03:00
KERNEL="ht*", NAME="%k", GROUP="tape"
KERNEL="nht*", NAME="%k", GROUP="tape"
KERNEL="pt*", NAME="%k", GROUP="tape"
KERNEL="npt*", NAME="%k", GROUP="tape"
KERNEL="st*", NAME="%k", GROUP="tape"
KERNEL="nst*", NAME="%k", GROUP="tape"
2004-12-20 05:11:22 +03:00
KERNEL="osst*", NAME="%k", GROUP="tape"
KERNEL="nosst*", NAME="%k", GROUP="tape"
2004-12-18 14:22:16 +03:00
# diskonkey devices
2004-12-20 05:04:11 +03:00
KERNEL="diskonkey*", NAME="%k", GROUP="disk"
2004-12-18 14:22:16 +03:00
# rem_ide devices
2004-12-20 05:04:11 +03:00
KERNEL="microdrive*", NAME="%k", GROUP="disk"
2004-12-18 14:22:16 +03:00
2004-12-21 00:24:19 +03:00
# all block devices
SUBSYSTEM="block", NAME="%k", GROUP="disk"
2004-12-18 14:22:16 +03:00
# kbd devices
KERNEL="kbd", NAME="%k", MODE="0664"
# Sony Vaio Jogdial sonypi device
KERNEL="sonypi", NAME="%k", MODE="0666"