SOURCES (AC-branch): start_udev, udev.conf, udev.rules - updated f...

freetz freetz at pld-linux.org
Thu Jan 26 17:08:29 CET 2006


Author: freetz                       Date: Thu Jan 26 16:08:29 2006 GMT
Module: SOURCES                       Tag: AC-branch
---- Log message:
- updated from HEAD

---- Files affected:
SOURCES:
   start_udev (1.8 -> 1.8.2.1) , udev.conf (1.1.2.1 -> 1.1.2.2) , udev.rules (1.9 -> 1.9.2.1) 

---- Diffs:

================================================================
Index: SOURCES/start_udev
diff -u SOURCES/start_udev:1.8 SOURCES/start_udev:1.8.2.1
--- SOURCES/start_udev:1.8	Mon Nov  1 23:15:38 2004
+++ SOURCES/start_udev	Thu Jan 26 17:08:23 2006
@@ -19,14 +19,18 @@
 # Yes, it's very verbose, feel free to turn off all of the echo calls,
 # they were there to make me feel better that everything was working
 # properly during development...
-#
+
+# default value, if no config present.
+udev_root="/dev/"
+sysfs_dir="/sys"
+udevd_timeout=8
+
 # don't use udev if sysfs is not mounted.
-[ ! -d $sysfs_dir/class ] || exit 1
+[ -d $sysfs_dir/class ] || exit 1
 [ -r /proc/mounts ] || exit 1
 [ -x /sbin/udev ] || exit 1
 [ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf
 
-
 . /etc/rc.d/init.d/functions
 
 prog=udev
@@ -35,28 +39,17 @@
 MAKEDEV="/sbin/MAKEDEV"
 
 make_extra_nodes () {
-	ln -snf /proc/self/fd $udev_root/fd
-	ln -snf /proc/self/fd/0 $udev_root/stdin
-	ln -snf /proc/self/fd/1 $udev_root/stdout
-	ln -snf /proc/self/fd/2 $udev_root/stderr
-	ln -snf /proc/kcore $udev_root/core
-
-	[ -d $udev_root/pts ] || (mkdir $udev_root/pts;chmod 0755 $udev_root/pts)
-	[ -d $udev_root/shm ] || (mkdir $udev_root/shm;chmod 0755 $udev_root/shm)
-
-	if [ -x $MAKEDEV ]; then
-		$MAKEDEV -x $( 
-			for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do
-			    echo cpu/$i/microcode;
-			done;
-			for i in 1 2 3 4 5 6; do echo tty$i;done;
-			for i in 0 1 2 3 4 5 6 7; do echo loop$i; done;
-			for i in 0 1 2 3; do echo lp$i; echo parport$i;done;
-			echo net/tun ppp console null zero;
-		);
-		[ -a /dev/MAKEDEV ] || ln -s $MAKEDEV /dev/MAKEDEV;
-		cp -a /etc/udev/devices/* /dev/ >/dev/null 2>&1 || :
-	fi
+	grep '^[^#]' /etc/udev/links.conf | \
+	while read type name arg1; do
+	    [ "$type" -a "$name" -a ! -e "$udev_root/$name" -a ! -L "/dev/$name" ] ||continue
+	    case "$type" in
+    		L) ln -s $arg1 $udev_root/$name ;;
+	        D) mkdir -p $udev_root/$name ;;
+    		M) mknod --mode=600 $udev_root/$name $arg1 ;;
+	        *) echo "links.conf: unparseable line ($type $name $arg1)" ;;
+	    esac
+	done
+	cp -a /lib/udev/devices/* /dev/ >/dev/null 2>&1 || :
 }
 
 kill_udevd() {
@@ -68,21 +61,21 @@
 
 # we cannot use /usr/bin/find here
 find_d () {
-        where=$1
-        what=$2
-        found=""
-        for f in $where/*; do
-                if [ -d "$f" -a ! -L "$f" ]; then
+	where=$1
+	what=$2
+	found=""
+	for f in $where/*; do
+		if [ -d "$f" -a ! -L "$f" ]; then
 			if [ "$f" != "${f%%$what}" ];then 
-			        # make sure we are at the path end
-			        # we have no dirname and basename
+				# make sure we are at the path end
+				# we have no dirname and basename
 				rest="${f#*$what}"
 				[ "${rest##*/}" = "$rest" ] && found="$found $f"
 			fi
-                        found="$found $(find_d $f $what)"
-                fi
-        done
-        echo "$found"
+			found="$found $(find_d $f $what)"
+		fi
+	done
+	echo "$found"
 }
 
 # we cannot use /usr/bin/find here
@@ -94,37 +87,31 @@
 		if [ -d "$f" -a ! -L "$f" ]; then
 			found="$found $(find_f $f $what)"
 		elif [ -e "$f" ]; then 
-			[ "$f" != "${f%$what}" ] && found="$found $f"
+			[ "$where/" = "${f%$what}" ] && found="$found $f"
 		fi
 	done
-	echo "$found"
+	[ -n "$found" ] && echo "$found"
 }
 
 # call hotplug with the scsi devices
 scsi_replay () {
-        HOTPLUG=$(cat /proc/sys/kernel/hotplug)
-        [ -z "$HOTPLUG" ] && return 1
+	HOTPLUG="/sbin/udevsend"
 
-        scsi_hosts=$(find_d /sys/devices host\*)
-        SEQNUM=1
+	scsi_hosts=$(find_d /sys/devices host\*)
+	SEQNUM=1
 
-        for host in $scsi_hosts; do
-                [ -d $host ] || continue
-                devs=$(find_f $host type)
-                for dev in $devs;do
-                        [ -f $dev ] || continue
-                        export SEQNUM
-                        DEVPATH=${dev%/type}
-                        DEVPATH=${DEVPATH#/sys}
-                        export DEVPATH
-                        export ACTION=add
-                        $HOTPLUG scsi_device
-                        SEQNUM=$(($SEQNUM + 1))
-                        $HOTPLUG scsi 
-                        SEQNUM=$(($SEQNUM + 1))
-                done
-        done
-        return 0
+	for host in $scsi_hosts; do
+		[ -d $host ] || continue
+		devs=$(find_f $host type)
+		for dev in $devs;do
+			[ -f $dev ] || continue
+			DEVPATH=${dev%/type}
+			DEVPATH=${DEVPATH#/sys}
+			/bin/env -i DEVPATH="$DEVPATH" SUBSYSTEM=scsi_device ACTION=add $HOTPLUG scsi_device
+			/bin/env -i DEVPATH="$DEVPATH" ACTION=add SUBSYSTEM=scsi $HOTPLUG scsi
+		done
+	done
+	return 0
 }
 
 ide_scan() {
@@ -155,24 +142,87 @@
 	return 0
 }
 
+supported_kernel() {
+    case "$(uname -r)" in
+    2.[012345].*) return 1 ;;
+    esac
+    return 0
+}
+
+set_hotplug_handler() {
+    echo /sbin/udevsend > /proc/sys/kernel/hotplug
+}
+
 export ACTION=add
-export UDEV_NO_SLEEP=1
 prog=udev
 ret=0
-nls "Starting udev"
-# propagate $udev_root from /sys
-grep -q "none ${udev_root%/} " /proc/mounts || { 
+show "Starting udev"
+busy
+
+if ! supported_kernel; then
+    fail
+    echo "udev requires a kernel >= 2.6.x, not started."
+    exit 0                                                
+fi
+
+# mount the tmpfs on ${udev_root%/}, if not already done
+LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/mounts && {
+	if LANG=C fgrep -q "none ${udev_root%/}/pts " /proc/mounts; then
+		PTSDIR=$(mktemp -d ${TMPDIR:-/tmp}/tmpXXXXXX)
+		mount --move $udev_root/pts "$PTSDIR"
+	fi
+	if LANG=C fgrep -q "none ${udev_root%/}/shm " /proc/mounts; then
+		SHMDIR=$(mktemp -d ${TMPDIR:-/tmp}/tmpXXXXXX)
+		mount --move $udev_root/shm "$SHMDIR"
+	fi
 	mount -n -o mode=0755 -t tmpfs none "$udev_root"
-	ret=$(($ret + $?))
+	mkdir -m 0755 $udev_root/pts
+	mkdir -m 0755 $udev_root/shm
+	if [ -n "$PTSDIR" ]; then
+		mount --move "$PTSDIR" $udev_root/pts
+		rmdir "$PTSDIR"
+	fi
+	if [ -n "$SHMDIR" ]; then
+		mount --move "$SHMDIR" $udev_root/shm
+		rmdir "$SHMDIR"
+	fi
+
+	ret=$(( $ret + $? ))
 }
-rm -f $udev_root/.udev.tdb
+
+
+kill_udevd > "$udev_root/null" 2>&1
+
+scsi_replay > "$udev_root/null" 2>&1
+
+ret=$(( $ret + $? ))
+
+ide_scan > "$udev_root/null" 2>&1
+
+# Starting the hotplug events dispatcher
+/sbin/udevd --daemon
+
+# Making extra nodes
 make_extra_nodes
-kill_udevd >/dev/null 2>&1
-scsi_replay >/dev/null 2>&1
-ret=$(($ret + $?))
-kill_udevd >/dev/null 2>&1
-ide_scan >/dev/null 2>&1
-/sbin/udevstart 
-ret=$(($ret + $?))
+
+# Setting default hotplug handler
+set_hotplug_handler
+
+# Synthesizing the initial hotplug events
+/sbin/${UDEV_STARTER}
+
+# wait for /dev to be fully populated
+while [ -d /dev/.udev/queue/ ]; do
+    sleep 0.2
+    udevd_timeout=$(($udevd_timeout - 1))
+    if [ $udevd_timeout -eq 0 ]; then
+	break
+    fi
+done
+
+# Start workaround for broken Linux input subsystem
+/lib/udev/udev_input_coldplug start
+
+ret=$(( $ret + $? ))
 [ $ret -eq 0 ] && ok || fail
 exit 0

================================================================
Index: SOURCES/udev.conf
diff -u SOURCES/udev.conf:1.1.2.1 SOURCES/udev.conf:1.1.2.2
--- SOURCES/udev.conf:1.1.2.1	Mon Nov 15 10:39:19 2004
+++ SOURCES/udev.conf	Thu Jan 26 17:08:23 2006
@@ -7,41 +7,32 @@
 # WARNING: changing any value, can cause serious system breakage!
 #
 
-# udev_root - where in the filesystem to place the device nodes
-udev_root="/udev/"
+# Where in the filesystem to place the device nodes
+udev_root="/dev/"
 
-# udev_db - The name and location of the udev database.
-udev_db="/udev/.udev.tdb"
-
-# udev_rules - The name and location of the udev rules file
+# The name and location of the udev rules file
 udev_rules="/etc/udev/rules.d/"
 
-# udev_permissions - The name and location of the udev permission file
-udev_permissions="/etc/udev/permissions.d/"
-
-# default_mode - set the default mode for all nodes that have no
-#                explicit match in the permissions file
-default_mode="0600"
-
-# default_owner - set the default owner for all nodes that have no
-#                 explicit match in the permissions file
-default_owner="root"
-
-# default_group - set the default group for all nodes that have no
-#                 explicit match in the permissions file
-default_group="root"
-
-# udev_log - set to "yes" if you want logging, else "no"
-udev_log="yes"
-
-####################################################
-# Additional configuration options added by Red Hat
-####################################################
+# The initial syslog(3) priority: "err", "info", "debug" or its
+# numerical equivalent. For runtime debugging, the daemons internal
+# state can be changed with: "udevcontrol log_priority=<value>".
+udev_log="err"
 
 #
-# Variables in uppercase are for the scripts only
+# Initial hotplug synthesizing method. Possible values:
+# udevstart (default) or udevsynthesize (new/experimental).
+# 
+# udevsynthesize gets all available devices from sysfs and synthesizes the
+# events these devices would have generated at creation time.
+# The events are directly passed to the udevd daemom socket. udevd does all the
+# work and runs all the events asynchronously. udevsynthesize itself does
+# not read any udev rule.
 #
-
-# if shell script actions should be logged
-UDEV_LOG="yes"
-
+# It scans block and class devices to create the the device nodes for already
+# available devices, which obsoletes the run of udevstart.
+#
+# After that, it scans for bus devices, which events may load modules or
+# configure the device. If the bus type is known, the usual bus-specific
+# values are added to the event environment.
+#
+UDEV_STARTER="udevstart"

================================================================
Index: SOURCES/udev.rules
diff -u SOURCES/udev.rules:1.9 SOURCES/udev.rules:1.9.2.1
--- SOURCES/udev.rules:1.9	Tue Nov  2 00:44:18 2004
+++ SOURCES/udev.rules	Thu Jan 26 17:08:23 2006
@@ -1,131 +1,267 @@
+#
+# PLD Linux Distribution udev 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.
 #
-# See the udev.rules.examples file for more examples of how to create rules
+# Try not to modify this file, if you wish to change things, create a new rule
+# file that can be run before this one.
 #
 
-# create a symlink named after the device map name
-# note devmap_name comes with extras/multipath
-KERNEL="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK="%c"
-KERNEL="device-mapper", NAME="mapper/control"
+# workaround for devices which do not report media changes         
+BUS=="ide", KERNEL=="hd[a-z]", SYSFS{removable}=="1", \
+       ENV{ID_MODEL}=="IOMEGA_ZIP*",   NAME="%k", OPTIONS+="all_partitions"
+       
+# 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="console", MODE="0660"
+KERNEL=="ptmx",			NAME="%k", GROUP="tty",	MODE="0666"
 
-# DRI devices always go into a subdirectory (as per the LSB spec)
-KERNEL="card*",		NAME="dri/card%n"
+# tty devices
+KERNEL=="ttyS[0-9]*",	NAME="tts/%n", SYMLINK+="%k", GROUP="ttyS"
+KERNEL=="ttyUSB[0-9]*",	NAME="tts/USB%n", GROUP="ttyS", MODE="0660"
+KERNEL=="ippp0",	NAME="%k",
+KERNEL=="isdn*"		NAME="%k",
+KERNEL=="dcbri*",	NAME="%k",
+KERNEL=="ircomm*",	NAME="%k", GROUP="ttyS"
+KERNEL=="rfcomm[0-9]*", NAME="%k", GROUP="ttyS", MODE="0664"
+
+# all block devices
+SUBSYSTEM=="block", GROUP="disk"
+
+# cdrom symlinks and other good cdrom naming
+BUS=="ide",	KERNEL=="hd[a-z]", ACTION=="add", IMPORT="/sbin/cdrom_id --export $tempnode"
+BUS=="scsi",	KERNEL="sr[0-9]*", ACTION=="add", IMPORT="/sbin/cdrom_id --export $tempnode"
+BUS=="scsi",	KERNEL="scd[a-z]", ACTION=="add", IMPORT="/sbin/cdrom_id --export $tempnode"
+ENV{ID_CDROM}=="?*",		SYMLINK+="cdrom%e",	GROUP="disk"
+ENV{ID_CDROM_CD_RW}=="?*",	SYMLINK+="cdrw%e",	GROUP="cdwrite"
+ENV{ID_CDROM_DVD}=="?*",	SYMLINK+="dvd%e",	GROUP="disk"
+ENV{ID_CDROM_DVD_R}=="?*",	SYMLINK+="dvdrw%e",	GROUP="cdwrite"
+
+# disk devices
+KERNEL=="sd*",		NAME="%k", GROUP="disk"
+KERNEL=="dasd*",	NAME="%k", GROUP="disk"
+KERNEL=="ataraid*",	NAME="%k", GROUP="disk"
+
+# compaq smart array
+KERNEL=="cciss*",	PROGRAM="/lib/udev/raid-devfs.sh %k", NAME="%c{1}", SYMLINK+="%k"
+KERNEL=="ida*",		PROGRAM="/lib/udev/raid-devfs.sh %k", NAME="%c{1}", SYMLINK+="%k"
+
+# mylex
+KERNEL=="rd*",		PROGRAM="/lib/udev/raid-devfs.sh %k", NAME="%c{1}", SYMLINK+="%k"
+
+# dri devices
+SUBSYSTEM=="graphics",	KERNEL=="3dfx*",	NAME="%k", GROUP="video"
+SUBSYSTEM=="graphics",	KERNEL=="card*",	NAME="dri/card%n", GROUP="video"
+SUBSYSTEM=="graphics",	KERNEL=="nvidiactl*",	NAME="%k", GROUP="video"
+SUBSYSTEM=="graphics",	KERNEL=="nvidia*",	NAME="%k", GROUP="video"
 
 # alsa devices
-KERNEL="controlC[0-9]*", NAME="snd/%k"
-KERNEL="hw[CD0-9]*",     NAME="snd/%k"
-KERNEL="pcm[CD0-9cp]*",  NAME="snd/%k"
-KERNEL="midi[CD0-9]*",   NAME="snd/%k"
-KERNEL="timer",          NAME="snd/%k"
-KERNEL="seq",            NAME="snd/%k"
+SUBSYSTEM="sound",	KERNEL=="controlC[0-9]*",	NAME="snd/%k",	GROUP="audio"
+SUBSYSTEM="sound",	KERNEL=="hw[CD0-9]*",		NAME="snd/%k",	GROUP="audio"
+SUBSYSTEM="sound",	KERNEL=="midiC[D0-9]*",		NAME="snd/%k",	GROUP="audio"
+SUBSYSTEM="sound",	KERNEL=="pcm[CD0-9cp]*",	NAME="snd/%k",	GROUP="audio"
+SUBSYSTEM="sound",	KERNEL=="seq",			NAME="snd/%k",	GROUP="audio"
+SUBSYSTEM="sound",	KERNEL=="timer",		NAME="snd/%k",	GROUP="audio"
 
-# input devices
-KERNEL="mice",		NAME="input/%k"
-KERNEL="mouse*",	NAME="input/%k"
-KERNEL="event*",	NAME="input/%k"
-KERNEL="js*",		NAME="input/%k"
-KERNEL="ts*",		NAME="input/%k"
+# sound devices
+SUBSYSTEM="sound",	KERNEL=="adsp",			NAME="sound/%k",	SYMLINK+="%k",	GROUP="audio"
+SUBSYSTEM="sound",	KERNEL=="adsp[0-9]*",		NAME="sound/%k",	SYMLINK+="%k",	GROUP="audio"
+SUBSYSTEM="sound",	KERNEL=="audio",		NAME="sound/%k",	SYMLINK+="%k",	GROUP="audio"
+SUBSYSTEM="sound",	KERNEL=="audio[0-9]*",		NAME="sound/%k",	SYMLINK+="%k",	GROUP="audio"
+SUBSYSTEM="sound",	KERNEL=="dsp",			NAME="sound/%k",	SYMLINK+="%k",	GROUP="audio"
+SUBSYSTEM="sound",	KERNEL=="dsp[0-9]*",		NAME="sound/%k",	SYMLINK+="%k",	GROUP="audio"
+SUBSYSTEM="sound",	KERNEL=="mixer",		NAME="sound/%k",	SYMLINK+="%k",	GROUP="audio"
+SUBSYSTEM="sound",	KERNEL=="mixer[0-9]*",		NAME="sound/%k",	SYMLINK+="%k",	GROUP="audio"
+SUBSYSTEM="sound",	KERNEL=="sequencer",		NAME="sound/%k",	SYMLINK+="%k",	GROUP="audio"
+SUBSYSTEM="sound",	KERNEL=="sequencer[0-9]*",	NAME="sound/%k",	SYMLINK+="%k",	GROUP="audio"
+
+# 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"
 
-BUS="usb", KERNEL="lp[0-9]*", NAME="usb/%k"
+# dm devices (ignore them)
+KERNEL=="dm-[0-9]*",	OPTIONS="ignore_device"
+# create a symlink named after the device map name
+# note devmap_name comes with multipath-tools package and it has it's own .rules file
+#KERNEL=="dm-[0-9]*",	PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK+="%c"
+KERNEL=="device-mapper",	NAME="mapper/control"
 
 # fb devices
-KERNEL="fb[0-9]*", NAME="fb/%n", SYMLINK="%k"
+KERNEL=="fb[0-9]*",	NAME="fb/%n", SYMLINK+="%k", GROUP="video"
 
 # floppy devices
-KERNEL="fd[0-9]*", NAME="floppy/%n", SYMLINK="%k"
+KERNEL=="fd[0-9]*",	NAME="floppy/%n", SYMLINK+="%k", GROUP="floppy"
 
 # i2c devices
-KERNEL="i2c-[0-9]*", NAME="i2c/%n", SYMLINK="%k"
+KERNEL=="i2c-[0-9]*",	NAME="i2c/%n", SYMLINK+="%k"
+
+# input devices
+KERNEL=="event*",	NAME="input/%k", MODE="0600"
+KERNEL=="js*",		NAME="input/%k", MODE="664", GROUP="sys"
+KERNEL=="lirc0",	NAME="%k", SYMLINK+="lirc"
+KERNEL=="mice",		NAME="input/%k", MODE="0644"
+KERNEL=="mouse*",	NAME="input/%k", MODE="0644"
+KERNEL=="ts*",		NAME="input/%k", MODE="0600"
+KERNEL=="uinput",	NAME="input/%k"
+
+# loop devices
+KERNEL=="loop[0-9]*",	NAME="loop/%n", SYMLINK+="%k", GROUP="disk"
+
+# md block devices
+KERNEL=="md[0-9]*",	NAME="md/%n", SYMLINK+="%k", GROUP="disk"
+
+# aoe char devices,
+SUBSYSTEM=="aoe", KERNEL=="discover",	NAME="etherd/%k", GROUP="disk", MODE="0220"
+SUBSYSTEM=="aoe", KERNEL=="err",	NAME="etherd/%k", GROUP="disk", MODE="0440"
+SUBSYSTEM=="aoe", KERNEL=="interfaces",	NAME="etherd/%k", GROUP="disk", MODE="0220"
 
 # misc devices
-KERNEL="rtc",     NAME="misc/%k", SYMLINK="%k"
-KERNEL="psaux",   NAME="misc/%k", SYMLINK="%k"
-KERNEL="agpgart", NAME="misc/%k", SYMLINK="%k"
-KERNEL="rtc",     NAME="misc/%k", SYMLINK="%k"
-KERNEL="psaux",   NAME="misc/%k", SYMLINK="%k"
-KERNEL="uinput",  NAME="misc/%k", SYMLINK="%k"
-
-# pty devices
-KERNEL="pty[p-za-e][0-9a-f]*", NAME="pty/m%n", SYMLINK="%k"
-KERNEL="tty[p-za-e][0-9a-f]*", NAME="tty/s%n", SYMLINK="%k"
+KERNEL=="agpgart",	NAME="misc/%k", SYMLINK+="%k", MODE="660", GROUP="video"
+KERNEL=="cdemu[0-9]*",		NAME="cdemu/%n"
+KERNEL=="hw_random",	NAME="hwrng"
+KERNEL=="inotify",	NAME="misc/%k", SYMLINK+="%k", MODE="0666"
+KERNEL=="psaux",	NAME="misc/%k", SYMLINK+="%k"
+KERNEL=="rtc",		NAME="misc/%k", SYMLINK+="%k", MODE="0664"
+KERNEL=="uinput",	NAME="misc/%k", SYMLINK+="%k"
+
+# 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"
+
+# network devices
+KERNEL=="tun",		NAME="net/%k"
 
 # ramdisk devices
-KERNEL="ram[0-9]*", NAME="rd/%n", SYMLINK="%k"
+KERNEL=="ram[0-9]*",	NAME="rd/%n", SYMLINK+="%k"
 
-# sound devices
-KERNEL="adsp",       NAME="sound/adsp"        SYMLINK="%k"
-KERNEL="audio",      NAME="sound/audio",      SYMLINK="%k"
-KERNEL="dsp",        NAME="sound/dsp",        SYMLINK="%k"
-KERNEL="mixer",      NAME="sound/mixer",      SYMLINK="%k"
-KERNEL="sequencer",  NAME="sound/sequencer",  SYMLINK="%k"
-KERNEL="sequencer2", NAME="sound/sequencer2", SYMLINK="%k"
-
-# tty devices
-KERNEL="tty[0-9]*",    NAME="vc/%n",  SYMLINK="%k"
-KERNEL="ttyS[0-9]*",   NAME="tts/%n", SYMLINK="%k"
-KERNEL="ttyUSB[0-9]*", NAME="tts/USB%n"
-
-# vc devices
-KERNEL="vcs",        NAME="vcc/0",   SYMLINK="%k"
-KERNEL="vcs[0-9]*",  NAME="vcc/%n",  SYMLINK="%k"
-KERNEL="vcsa",       NAME="vcc/a0",  SYMLINK="%k"
-KERNEL="vcsa[0-9]*", NAME="vcc/a%n", SYMLINK="%k"
+# IEEE1394 (firewire) devices (must be before raw devices below)
+KERNEL=="raw1394",	NAME="%k",		GROUP="video"
+KERNEL=="dv1394*",	NAME="dv1394/%n",	GROUP="video"
+KERNEL=="video1394*",	NAME="video1394/%n",	GROUP="video"
+
+# raw devices
+KERNEL=="raw[0-9]*",	NAME="raw/%k", GROUP="disk"
+KERNEL=="ram*",		NAME="%k", GROUP="disk"
+
+# memory devices
+KERNEL=="random",	NAME="%k", MODE="0644"
+KERNEL=="urandom",	NAME="%k", MODE="0644"
+KERNEL=="mem",		NAME="%k", MODE="0640", GROUP="kmem"
+KERNEL=="kmem",		NAME="%k", MODE="0640", GROUP="kmem"
+KERNEL=="port",		NAME="%k", MODE="0640", GROUP="kmem"
+KERNEL=="full",		NAME="%k", MODE="0666"
+KERNEL=="null",		NAME="%k", MODE="0666", SYMLINK+="drzewo"
+KERNEL=="zero",		NAME="%k", MODE="0666"
+
+# misc usb devices
+BUS=="usb",		KERNEL=="auer[0-9]*",	NAME="usb/%k"
+BUS=="usb",		KERNEL=="cpad[0-9]*",	NAME="usb/%k"
+BUS=="usb",		KERNEL=="dabusb*",	NAME="usb/%k"
+BUS=="usb",		KERNEL=="hiddev*",	NAME="usb/%k"
+BUS=="usb".		KERNEL=="legousbtower*",	NAME="usb/%k"
+BUS=="usb",		KERNEL=="ttyUSB*", 	SYSFS{product}=="Palm Handheld*", SYMLINK+="pilot"
+
+# usbfs-like device nodes
+SUBSYSTEM="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", \
+			SYMLINK+="%c", GROUP="usb", MODE="0664"
 
 # v4l devices
-KERNEL="video[0-9]*", NAME="v4l/video%n"
-KERNEL="radio[0-9]*", NAME="v4l/radio%n"
-KERNEL="vbi[0-9]*",   NAME="v4l/vbi%n"
-KERNEL="vtx[0-9]*",   NAME="v4l/vtx%n"
-
-# CAPI devices
-KERNEL="capi",          NAME="capi20", SYMLINK="isdn/capi20"
-KERNEL="capi[0-9]*",    NAME="capi/%n"
-
-
-KERNEL="microcode",     SYMLINK="cpu/0/%k"
-KERNEL="ram1", 		SYMLINK="ram"
-KERNEL="video0",	SYMLINK="video"
-KERNEL="radio0",	SYMLINK="radio"
-KERNEL="audio0",	SYMLINK="audio"
-KERNEL="dsp0",		SYMLINK="dsp"
-KERNEL="fb0",		SYMLINK="fb"
-KERNEL="qft0",		SYMLINK="ftape"
-KERNEL="isdnctrl0",	SYMLINK="isdnctrl"
-KERNEL="mixer0",	SYMLINK="mixer"
-KERNEL="ram0",		SYMLINK="ramdisk"
-KERNEL="sbpcd0",	SYMLINK="sbpcd"
-KERNEL="radio0",	SYMLINK="radio"
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/start_udev?r1=1.8&r2=1.8.2.1&f=u
    http://cvs.pld-linux.org/SOURCES/udev.conf?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/SOURCES/udev.rules?r1=1.9&r2=1.9.2.1&f=u



More information about the pld-cvs-commit mailing list