chiark / gitweb /
[PATCH] udevinfo: print SYSFS attribute the same way we match it
[elogind.git] / udev.8.in
index dbba2979728f3f57ed0db18f030d0bc3ef549a7e..7b061a8c2b769a3c2555c7fdd709147c1259c4c8 100644 (file)
--- a/udev.8.in
+++ b/udev.8.in
@@ -2,7 +2,7 @@
 .SH NAME
 udev \- Linux configurable dynamic device naming support
 .SH SYNOPSIS
-.BI udev " hotplug-subsystem"
+.BI udev
 .SH "DESCRIPTION"
 .B udev
 provides a dynamic device directory containing only the files for actually
@@ -56,25 +56,28 @@ All rule files are read in lexical order. The default value is
 .IR /etc/udev/rules.d/ .
 .TP
 .B udev_log
-The switch to enable/disable logging of udev information
+The logging priority which can be set to
+.IR "err " , "info "
+or the corresponding numerical
+.BR syslog (3)
+value.
 The default value is
-.IR yes .
+.IR err .
 .P
 .RI "A sample " udev.conf " file might look like this:
 .sp
 .nf
-# udev_root - where to place the device nodes in the filesystem
-udev_root="/udev"
+# Where in the filesystem to place the device nodes
+udev_root="@udevdir@"
 
-# udev_db - The name and location of the udev database
-udev_db="/udev/.udevdb"
+# The name and location of the udev database.
+udev_db="@udevdir@/.udevdb"
 
-# udev_rules - The name of the udev rules file or directory to look
-               for files with the suffix .rules
-udev_rules="/etc/udev/rules.d/"
+# The name and location of the udev rules file(s).
+udev_rules="@configdir@/rules.d"
 
-# udev_log - set to "yes" if you want logging, else "no"
-udev_log="yes"
+# The syslog(3) priority: "err", "info", or the numerical value.
+udev_log="err"
 .fi
 .P
 The rules for device naming are read from the files located in the
@@ -115,13 +118,17 @@ Match the kernel driver name.
 Match the device number on the bus, like PCI bus id.
 .TP
 .BI SYSFS{ filename }
-Match sysfs device attribute like label, vendor, USB serial number, SCSI UUID
-or file system label. Up to 5 different sysfs files can be checked, with
-all of the values being required to match the rule.
+Match sysfs device attribute like vendor and product id's, USB serial number
+or the SCSI disk model number. Up to 5 different sysfs files can be checked,
+with all of the values being required to match the rule.
 .br
 Trailing whitespace characters in the sysfs attribute value are ignored, if
 the key doesn't have any trailing whitespace characters by itself.
 .TP
+.BI ENV{ variable }
+Match an environment variable. Up to 5 different environment variables can be
+checked, with all of the values being required to match the rule.
+.TP
 .B PROGRAM
 Call external program. This key is valid if the program returns successful.
 The environment variables of
@@ -167,7 +174,6 @@ compiled-in default value.
 .B last_rule
 will be the last rule applied. No later rules will have any effect.
 .sp
-.B OPTIONS
 .B ignore_device
 will ignore this device. No node will be created.
 .sp
@@ -234,6 +240,14 @@ decimal integer N is substituted such that the resulting name doesn't
 match an existing device node. Otherwise nothing is substituted. This
 can be used to create compatibility symlinks and enumerate devices of
 the same type originating from different kernel subsystems.
+.sp
+Note: The use of the enumeration facility is unreliable outside of
+udevstart where the node creation is serialized and predictable.
+The returned numbers rely on the order devices are probed on the
+system. If more than one device requests an enumeration for the same
+name at the same time, it may be possible that both requests receive the
+same name back from the database. The use of enumerations in todays setups
+where device can come and go at any time is not recomended.
 .TP
 .B %%
 The '%' character itself.
@@ -265,13 +279,6 @@ KERNEL=="ttyUSB1", NAME="pda", SYMLINK="palmtop handheld"
 
 # multiple USB webcams with symlinks to be called webcam0, webcam1, ...
 BUS=="usb", SYSFS{model}=="XV3", NAME=="video%n", SYMLINK="webcam%n"
-
-# grouping of optical drives from multiple kernel subsystems
-KERNEL=="sr*", NAME="%k", SYMLINK="cdrom%e"
-KERNEL=="scd*", NAME="%k", SYMLINK="cdrom%e"
-KERNEL=="pcd*", NAME="%k", SYMLINK="cdrom%e"
-KERNEL=="hd[a-z]", PROGRAM=="/bin/cat /proc/ide/%k/media", RESULT=="cdrom",
-  NAME="%k", SYMLINK="cdrom%e"
 .fi
 .P
 A number of different fields in the above configuration files support a simple
@@ -300,8 +307,9 @@ to be recognized.
 .br
 In addition to the hotplug environment variables,
 .B UDEV_LOG
-is set if udev is configured to use the syslog facility. Executed programs may
-want to follow that setting.
+is set and contains the numerical priority value, if udev is configured to use
+.BR syslog (3).
+Executed programs may want to follow that setting.
 .B DEVNAME
 is exported to make the name of the created node, or the name the network
 device is renamed to, available to the executed program. The programs in every
@@ -333,6 +341,9 @@ Overrides the default location of the
 .B udev
 config file.
 .TP
+.B UDEV_LOG
+Overrides the log priority specified in the config file.
+.TP
 .B UDEV_NO_DEVD
 The default behavior of
 .B udev
@@ -355,8 +366,8 @@ will skip this step.
 .PP
 .B Web resources:
 .nf
-.I http://linux\-hotplug.sourceforge.net/
 .I http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
+.I http://linux\-hotplug.sourceforge.net/
 .fi
 .SH AUTHORS
 .B udev