Author: bryan
Date: 2007-10-29 18:50:24 -0600 (Mon, 29 Oct 2007)
New Revision: 8425
Added:
trunk/udev-config/55-lfs.rules
trunk/udev-config/doc/55-lfs.rules
Removed:
trunk/udev-config/51-lfs.rules
trunk/udev-config/doc/51-lfs.txt
Modified:
trunk/udev-config/ChangeLog
trunk/udev-config/Makefile
Log:
Rename 51-lfs.rules to 55-lfs.rules, to keep a bit of space between upstream's
50-udev-default.rules and our overrides.
Rename the doc file to match.
Fix the Makefile to use the new filenames.
Deleted: trunk/udev-config/51-lfs.rules
===================================================================
--- trunk/udev-config/51-lfs.rules 2007-10-29 22:06:30 UTC (rev 8424)
+++ trunk/udev-config/51-lfs.rules 2007-10-30 00:50:24 UTC (rev 8425)
@@ -1,110 +0,0 @@
-# /etc/udev/rules.d/25-lfs.rules: Rule definitions for LFS.
-
-# Core kernel devices
-
-# override both of these
-KERNEL=="random", MODE="0444"
-KERNEL=="urandom", MODE="0444"
-
-KERNEL=="aio", MODE="0444"
-KERNEL=="kmsg", MODE="0600"
-KERNEL=="rtc", MODE="0666"
-
-# Comms devices
-
-KERNEL=="rfcomm[0-9]*", GROUP="dialout"
-# override all four of these
-KERNEL=="tty[BCDEFHILMPRSTUVWX][0-9]*", GROUP="dialout"
-KERNEL=="ttyS[ACIR][0-9]*", GROUP="dialout"
-KERNEL=="ttyUSB[0-9]*", GROUP="dialout"
-KERNEL=="ttyACM[0-9]*", GROUP="dialout"
-
-KERNEL=="ippp[0-9]*", GROUP="dialout"
-KERNEL=="isdn[0-9]*", GROUP="dialout"
-KERNEL=="isdnctrl[0-9]*", GROUP="dialout"
-KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20"
-KERNEL=="capi?*", NAME="capi/%n", GROUP="dialout"
-KERNEL=="dcbri[0-9]*", GROUP="dialout"
-# override
-KERNEL=="ircomm[0-9]*", GROUP="dialout"
-
-# ALSA devices go in their own subdirectory
-
-KERNEL=="controlC[0-9]*", GROUP="audio", NAME="snd/%k"
-KERNEL=="hwC[0-9]*D[0-9]*", GROUP="audio", NAME="snd/%k"
-KERNEL=="pcmC[0-9]*D[0-9]*[cp]", GROUP="audio", NAME="snd/%k"
-KERNEL=="midiC[0-9]*D[0-9]*", GROUP="audio", NAME="snd/%k"
-KERNEL=="timer", GROUP="audio", NAME="snd/%k"
-KERNEL=="seq", GROUP="audio", NAME="snd/%k"
-
-# Sound devices
-
-KERNEL=="admmidi*", GROUP="audio"
-KERNEL=="adsp*", GROUP="audio"
-KERNEL=="aload*", GROUP="audio"
-KERNEL=="amidi*", GROUP="audio"
-KERNEL=="amixer*", GROUP="audio"
-KERNEL=="audio*", GROUP="audio"
-KERNEL=="dmfm*", GROUP="audio"
-KERNEL=="dmmidi*", GROUP="audio"
-KERNEL=="dsp*", GROUP="audio"
-KERNEL=="midi*", GROUP="audio"
-KERNEL=="mixer*", GROUP="audio"
-KERNEL=="music", GROUP="audio"
-KERNEL=="sequencer*", GROUP="audio"
-
-# Input devices
-
-# override MODE on these four
-KERNEL=="mice", MODE="0644", SYMLINK+="mouse"
-KERNEL=="mouse*", MODE="0644"
-KERNEL=="event*", MODE="0644"
-KERNEL=="ts*", MODE="0644"
-
-KERNEL=="psaux", MODE="0644"
-KERNEL=="js", MODE="0644"
-KERNEL=="djs", MODE="0644"
-
-# USB devices go in their own subdirectory
-
-KERNEL=="hiddev*", NAME="usb/%k"
-KERNEL=="legousbtower*", NAME="usb/%k"
-KERNEL=="dabusb*", NAME="usb/%k"
-SUBSYSTEMS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k"
-
-# DRI devices are managed by the X server, so prevent udev from creating them
-
-KERNEL=="card*", OPTIONS+="ignore_device"
-
-# Video devices
-
-KERNEL=="fb[0-9]*", GROUP="video"
-KERNEL=="video[0-9]*", GROUP="video"
-KERNEL=="radio[0-9]*", GROUP="video"
-KERNEL=="vbi[0-9]*", GROUP="video"
-KERNEL=="vtx[0-9]*", GROUP="video"
-
-# DVB devices
-
-SUBSYSTEM=="dvb", GROUP="video"
-
-# Storage/memory devices
-
-# override: make group-writable
-SUBSYSTEM=="block", MODE="0660"
-
-# dmsetup and lvm2 related programs create devicemapper devices so we prevent
-# udev from creating them
-
-KERNEL=="dm-*", OPTIONS+="ignore_device"
-KERNEL=="device-mapper", OPTIONS+="ignore_device"
-
-# Tape devices
-
-# override all these
-KERNEL=="ht[0-9]*", GROUP="tape"
-KERNEL=="nht[0-9]*", GROUP="tape"
-KERNEL=="pt[0-9]*", GROUP="tape"
-KERNEL=="npt[0-9]*", GROUP="tape"
-KERNEL=="st[0-9]*", GROUP="tape"
-KERNEL=="nst[0-9]*", GROUP="tape"
Copied: trunk/udev-config/55-lfs.rules (from rev 8424,
trunk/udev-config/51-lfs.rules)
===================================================================
--- trunk/udev-config/55-lfs.rules (rev 0)
+++ trunk/udev-config/55-lfs.rules 2007-10-30 00:50:24 UTC (rev 8425)
@@ -0,0 +1,110 @@
+# /etc/udev/rules.d/25-lfs.rules: Rule definitions for LFS.
+
+# Core kernel devices
+
+# override both of these
+KERNEL=="random", MODE="0444"
+KERNEL=="urandom", MODE="0444"
+
+KERNEL=="aio", MODE="0444"
+KERNEL=="kmsg", MODE="0600"
+KERNEL=="rtc", MODE="0666"
+
+# Comms devices
+
+KERNEL=="rfcomm[0-9]*", GROUP="dialout"
+# override all four of these
+KERNEL=="tty[BCDEFHILMPRSTUVWX][0-9]*", GROUP="dialout"
+KERNEL=="ttyS[ACIR][0-9]*", GROUP="dialout"
+KERNEL=="ttyUSB[0-9]*", GROUP="dialout"
+KERNEL=="ttyACM[0-9]*", GROUP="dialout"
+
+KERNEL=="ippp[0-9]*", GROUP="dialout"
+KERNEL=="isdn[0-9]*", GROUP="dialout"
+KERNEL=="isdnctrl[0-9]*", GROUP="dialout"
+KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20"
+KERNEL=="capi?*", NAME="capi/%n", GROUP="dialout"
+KERNEL=="dcbri[0-9]*", GROUP="dialout"
+# override
+KERNEL=="ircomm[0-9]*", GROUP="dialout"
+
+# ALSA devices go in their own subdirectory
+
+KERNEL=="controlC[0-9]*", GROUP="audio", NAME="snd/%k"
+KERNEL=="hwC[0-9]*D[0-9]*", GROUP="audio", NAME="snd/%k"
+KERNEL=="pcmC[0-9]*D[0-9]*[cp]", GROUP="audio", NAME="snd/%k"
+KERNEL=="midiC[0-9]*D[0-9]*", GROUP="audio", NAME="snd/%k"
+KERNEL=="timer", GROUP="audio", NAME="snd/%k"
+KERNEL=="seq", GROUP="audio", NAME="snd/%k"
+
+# Sound devices
+
+KERNEL=="admmidi*", GROUP="audio"
+KERNEL=="adsp*", GROUP="audio"
+KERNEL=="aload*", GROUP="audio"
+KERNEL=="amidi*", GROUP="audio"
+KERNEL=="amixer*", GROUP="audio"
+KERNEL=="audio*", GROUP="audio"
+KERNEL=="dmfm*", GROUP="audio"
+KERNEL=="dmmidi*", GROUP="audio"
+KERNEL=="dsp*", GROUP="audio"
+KERNEL=="midi*", GROUP="audio"
+KERNEL=="mixer*", GROUP="audio"
+KERNEL=="music", GROUP="audio"
+KERNEL=="sequencer*", GROUP="audio"
+
+# Input devices
+
+# override MODE on these four
+KERNEL=="mice", MODE="0644", SYMLINK+="mouse"
+KERNEL=="mouse*", MODE="0644"
+KERNEL=="event*", MODE="0644"
+KERNEL=="ts*", MODE="0644"
+
+KERNEL=="psaux", MODE="0644"
+KERNEL=="js", MODE="0644"
+KERNEL=="djs", MODE="0644"
+
+# USB devices go in their own subdirectory
+
+KERNEL=="hiddev*", NAME="usb/%k"
+KERNEL=="legousbtower*", NAME="usb/%k"
+KERNEL=="dabusb*", NAME="usb/%k"
+SUBSYSTEMS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k"
+
+# DRI devices are managed by the X server, so prevent udev from creating them
+
+KERNEL=="card*", OPTIONS+="ignore_device"
+
+# Video devices
+
+KERNEL=="fb[0-9]*", GROUP="video"
+KERNEL=="video[0-9]*", GROUP="video"
+KERNEL=="radio[0-9]*", GROUP="video"
+KERNEL=="vbi[0-9]*", GROUP="video"
+KERNEL=="vtx[0-9]*", GROUP="video"
+
+# DVB devices
+
+SUBSYSTEM=="dvb", GROUP="video"
+
+# Storage/memory devices
+
+# override: make group-writable
+SUBSYSTEM=="block", MODE="0660"
+
+# dmsetup and lvm2 related programs create devicemapper devices so we prevent
+# udev from creating them
+
+KERNEL=="dm-*", OPTIONS+="ignore_device"
+KERNEL=="device-mapper", OPTIONS+="ignore_device"
+
+# Tape devices
+
+# override all these
+KERNEL=="ht[0-9]*", GROUP="tape"
+KERNEL=="nht[0-9]*", GROUP="tape"
+KERNEL=="pt[0-9]*", GROUP="tape"
+KERNEL=="npt[0-9]*", GROUP="tape"
+KERNEL=="st[0-9]*", GROUP="tape"
+KERNEL=="nst[0-9]*", GROUP="tape"
Modified: trunk/udev-config/ChangeLog
===================================================================
--- trunk/udev-config/ChangeLog 2007-10-29 22:06:30 UTC (rev 8424)
+++ trunk/udev-config/ChangeLog 2007-10-30 00:50:24 UTC (rev 8425)
@@ -1,3 +1,7 @@
+2007-10-29 Bryan Kadzban <[EMAIL PROTECTED]>
+ * 51-lfs.rules: Move to 55-lfs.rules.
+ * doc/51-lfs.rules: Move to doc/55-lfs.rules.
+
2007-10-27 Bryan Kadzban <[EMAIL PROTECTED]>
* 25-lfs.rules: Some rules in here are duplicates of rules from udev's
new 50-udev-defaults.rules file; remove them. Override permissions
Modified: trunk/udev-config/Makefile
===================================================================
--- trunk/udev-config/Makefile 2007-10-29 22:06:30 UTC (rev 8424)
+++ trunk/udev-config/Makefile 2007-10-30 00:50:24 UTC (rev 8425)
@@ -5,7 +5,7 @@
INSTALL = install
INSTALL_DATA = $(INSTALL) -m644
RULES_FILES = \
- 51-lfs.rules \
+ 55-lfs.rules \
61-cdrom.rules \
81-firmware.rules
DOC_FILES = $(RULES_FILES:.rules=.txt)
Deleted: trunk/udev-config/doc/51-lfs.txt
===================================================================
--- trunk/udev-config/doc/51-lfs.txt 2007-10-29 22:06:30 UTC (rev 8424)
+++ trunk/udev-config/doc/51-lfs.txt 2007-10-30 00:50:24 UTC (rev 8425)
@@ -1,94 +0,0 @@
-Purpose of rules file:
-
-This is the core rules file for Udev on LFS. If these rules were not included,
-most devices would either only work for root, or would not work at all.
-
-
-Description of rules:
-
-By default, Udev creates device nodes with UID 0, GID 0, and permissions 0660,
-and in one flat directory structure with all nodes in /dev. This does not
-always work well.
-
-KERNEL=="ptmx"
-
-Any uevent generated by the kernel with a name matching "ptmx" will match this
-rule. Note that the matching done by Udev is shell-style; these are not regex
-matches. For the ptmx device, we first change the permisions, by assigning to
-the MODE value:
-
-KERNEL=="ptmx", MODE="0666"
-
-We also assign a different GID to /dev/ptmx (also all other TTY devices), by
-assigning to the GROUP value:
-
-KERNEL=="ptmx", MODE="0666", "GROUP="tty"
-
-
-There are also devices that should not be in /dev, because historically they
-have been created in subdirectories instead. For instance, all Alsa devices
-have traditionally been put into the /dev/snd subdirectory:
-
-KERNEL=="controlC[0-9]*", <...>, NAME="snd/%k"
-
-"%k" expands into "the original value of KERNEL" (note: not the pattern that
was
-matched against). This type of rule puts any matching device into the snd/
-subdirectory.
-
-Sometimes we need to move devices based on more than just their name. For
-example, USB printer devices need to be moved to /dev/usb/lpX, but we can't
-match only "lp[0-9]*", because that would also match parallel port printers.
-So we match both KERNEL and SUBSYSTEMS in this case, to move USB printers only.
-
-
-Some devices also commonly have symlinks pointing to them -- for example,
-/dev/mouse is usually a symlink to /dev/input/mice. We acheive this by
-assigning to the SYMLINK value. But note that SYMLINK can store multiple
values
-(because each device node could have multiple symlinks pointing to it), so we
-need to add to the list of symlinks, not overwrite the whole list:
-
-KERNEL=="mice", <...>, SYMLINK+="mouse"
-
-If we needed to add multiple symlinks, they would be space-separated inside the
-double quotes.
-
-Of course, symlinks, permissions, and device names can all be combined in a
-rule if needed. But note that if you combine permissions and symlinks, or if
-you combine GROUP and symlinks, the permissions of the symlink will not be
-modified, only those of the target device. (This is because the kernel does
-not pay any attention to the permissions on symlinks, only the permissions on
-their targets, and there's no reason to change something that won't be used.)
-
-
-Finally, we have this rule:
-
-SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'X=%k; X=$${X#usbdev};
B=$${X%%%%.*} D=$${X#*.}; echo bus/usb/$$B/$$D'", NAME="%c"
-
-This rule matches any device under the SUBSYSTEM of usb_device. (All devices
-that were traditionally created under /proc/bus/usb/ use this subsystem.) We
-tell Udev to run the specified PROGRAM; Udev will save the output of this
-program (it will be available under %c later).
-
-The program itself is a shell that starts by setting the variable X to the
-original kernel name (which is "usbdevB.D" for these devices, where B and D are
-the bus and device numbers of the USB device). Then, the rule re-sets X to the
-value of X with the string "usbdev" removed from the start. So now, X has the
-value "B.D". Then, the rule sets B to the value of X after a period, and all
-characters following it, have been removed from the end; this sets B to just
-the string "B" (just the bus number of the USB device). Then, the rule sets D
-to the value of X after a period, and all characters before it, have been
-removed from the beginning; this sets D to just the string "D" (just the device
-number).
-
-Then, the rule echoes "bus/usb/$B/$D" (bus/usb/bus-number/device-number), so
-Udev will capture that value. The rule sets NAME="%c" to put the device node
-at /dev/bus/usb/bus-number/device-number. (This is the same layout that the
-/proc/bus/usb/ devices used.)
-
-Most of the doubled characters in this rule are doubled so that Udev does not
-interpret them. The rule looks all the more confusing because of this method
-of escaping special characters.
-
-
-A final word of caution: Any particular rule must be written on one line, and a
-comma must separate each part of the rule.
Copied: trunk/udev-config/doc/55-lfs.rules (from rev 8424,
trunk/udev-config/doc/51-lfs.txt)
===================================================================
--- trunk/udev-config/doc/55-lfs.rules (rev 0)
+++ trunk/udev-config/doc/55-lfs.rules 2007-10-30 00:50:24 UTC (rev 8425)
@@ -0,0 +1,94 @@
+Purpose of rules file:
+
+This is the core rules file for Udev on LFS. If these rules were not included,
+most devices would either only work for root, or would not work at all.
+
+
+Description of rules:
+
+By default, Udev creates device nodes with UID 0, GID 0, and permissions 0660,
+and in one flat directory structure with all nodes in /dev. This does not
+always work well.
+
+KERNEL=="ptmx"
+
+Any uevent generated by the kernel with a name matching "ptmx" will match this
+rule. Note that the matching done by Udev is shell-style; these are not regex
+matches. For the ptmx device, we first change the permisions, by assigning to
+the MODE value:
+
+KERNEL=="ptmx", MODE="0666"
+
+We also assign a different GID to /dev/ptmx (also all other TTY devices), by
+assigning to the GROUP value:
+
+KERNEL=="ptmx", MODE="0666", "GROUP="tty"
+
+
+There are also devices that should not be in /dev, because historically they
+have been created in subdirectories instead. For instance, all Alsa devices
+have traditionally been put into the /dev/snd subdirectory:
+
+KERNEL=="controlC[0-9]*", <...>, NAME="snd/%k"
+
+"%k" expands into "the original value of KERNEL" (note: not the pattern that
was
+matched against). This type of rule puts any matching device into the snd/
+subdirectory.
+
+Sometimes we need to move devices based on more than just their name. For
+example, USB printer devices need to be moved to /dev/usb/lpX, but we can't
+match only "lp[0-9]*", because that would also match parallel port printers.
+So we match both KERNEL and SUBSYSTEMS in this case, to move USB printers only.
+
+
+Some devices also commonly have symlinks pointing to them -- for example,
+/dev/mouse is usually a symlink to /dev/input/mice. We acheive this by
+assigning to the SYMLINK value. But note that SYMLINK can store multiple
values
+(because each device node could have multiple symlinks pointing to it), so we
+need to add to the list of symlinks, not overwrite the whole list:
+
+KERNEL=="mice", <...>, SYMLINK+="mouse"
+
+If we needed to add multiple symlinks, they would be space-separated inside the
+double quotes.
+
+Of course, symlinks, permissions, and device names can all be combined in a
+rule if needed. But note that if you combine permissions and symlinks, or if
+you combine GROUP and symlinks, the permissions of the symlink will not be
+modified, only those of the target device. (This is because the kernel does
+not pay any attention to the permissions on symlinks, only the permissions on
+their targets, and there's no reason to change something that won't be used.)
+
+
+Finally, we have this rule:
+
+SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'X=%k; X=$${X#usbdev};
B=$${X%%%%.*} D=$${X#*.}; echo bus/usb/$$B/$$D'", NAME="%c"
+
+This rule matches any device under the SUBSYSTEM of usb_device. (All devices
+that were traditionally created under /proc/bus/usb/ use this subsystem.) We
+tell Udev to run the specified PROGRAM; Udev will save the output of this
+program (it will be available under %c later).
+
+The program itself is a shell that starts by setting the variable X to the
+original kernel name (which is "usbdevB.D" for these devices, where B and D are
+the bus and device numbers of the USB device). Then, the rule re-sets X to the
+value of X with the string "usbdev" removed from the start. So now, X has the
+value "B.D". Then, the rule sets B to the value of X after a period, and all
+characters following it, have been removed from the end; this sets B to just
+the string "B" (just the bus number of the USB device). Then, the rule sets D
+to the value of X after a period, and all characters before it, have been
+removed from the beginning; this sets D to just the string "D" (just the device
+number).
+
+Then, the rule echoes "bus/usb/$B/$D" (bus/usb/bus-number/device-number), so
+Udev will capture that value. The rule sets NAME="%c" to put the device node
+at /dev/bus/usb/bus-number/device-number. (This is the same layout that the
+/proc/bus/usb/ devices used.)
+
+Most of the doubled characters in this rule are doubled so that Udev does not
+interpret them. The rule looks all the more confusing because of this method
+of escaping special characters.
+
+
+A final word of caution: Any particular rule must be written on one line, and a
+comma must separate each part of the rule.
--
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page