-# /etc/udev/udev.rules: device naming rules for udev
+# /etc/udev/rules/50-udev.rules: device naming rules for udev
#
-# Gentoo specific rules, based a bit on devfs rules, but much simpler.
+# Gentoo specific rules
#
# 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.
-
-
-###########################################################
#
-# For devfs similar /dev layout (neater)
+# Try not to modify this file, if you wish to change things, create a new rule
+# file that can be run before this one.
#
-###########################################################
+
+
+# console
+KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", NAME="%k", GROUP="tty", OPTIONS="last_rule"
+KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", NAME="%k", GROUP="tty", OPTIONS="last_rule"
+KERNEL=="vcs*", NAME="%k", GROUP="tty", OPTIONS="last_rule"
+KERNEL=="vcsa*", NAME="%k", GROUP="tty", OPTIONS="last_rule"
+KERNEL=="tty", NAME="%k", GROUP="tty", MODE="0666", OPTIONS="last_rule"
+KERNEL=="tty[0-9]", NAME="%k", GROUP="tty", OPTIONS="last_rule"
+KERNEL=="tty[0-9][0-9]", NAME="%k", GROUP="tty", OPTIONS="last_rule"
+KERNEL=="console", NAME="%k", GROUP="tty", MODE="0600"
+KERNEL=="ptmx", NAME="%k", GROUP="tty", MODE="0666"
+
+# tty devices
+KERNEL=="ttyS[0-9]*", NAME="tts/%n", SYMLINK+="%k", GROUP="tty"
+KERNEL=="ttyUSB[0-9]*", NAME="tts/USB%n", GROUP="tty", MODE="0660"
+KERNEL=="ippp0", NAME="%k", GROUP="tty"
+KERNEL=="isdn*" NAME="%k", GROUP="tty"
+KERNEL=="dcbri*", NAME="%k", GROUP="tty"
+KERNEL=="ircomm*", NAME="%k", GROUP="tty"
# all block devices
SUBSYSTEM=="block", GROUP="disk"
KERNEL=="sequencer", NAME="sound/%k", SYMLINK+="%k", GROUP="audio"
KERNEL=="sequencer[0-9]*", NAME="sound/%k", SYMLINK+="%k", GROUP="audio"
-# tty devices
-KERNEL=="console", NAME="%k", GROUP="tty", MODE="0600"
-KERNEL=="tty", NAME="%k", GROUP="tty", MODE="0666"
-KERNEL=="tty[0-9]*", NAME="vc/%n", SYMLINK+="%k", GROUP="tty"
-KERNEL=="ttyS[0-9]*", NAME="tts/%n", SYMLINK+="%k", GROUP="tty"
-KERNEL=="ttyUSB[0-9]*", NAME="tts/USB%n", GROUP="tty", MODE="0660"
-KERNEL=="ippp0", NAME="%k", GROUP="tty"
-KERNEL=="isdn*" NAME="%k", GROUP="tty"
-KERNEL=="dcbri*", NAME="%k", GROUP="tty"
-KERNEL=="ircomm*", NAME="%k", GROUP="tty"
-
-# pty devices
-KERNEL=="ptmx", NAME="%k", GROUP="tty", MODE="0666"
-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"
-
-# vc devices
-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"
-
# memory devices
KERNEL=="random", NAME="%k", MODE="0666"
KERNEL=="urandom", NAME="%k", MODE="0444"