From 659cc3deea68e6461ba378c2a773d956eea390c8 Mon Sep 17 00:00:00 2001 From: Bryan Kadzban Date: Sun, 18 Feb 2007 13:59:36 +0000 Subject: Fix part of #1963 (use ATTRS instead of SYSFS), add the note about the backslash at the end of each line back into the book, and add a reference to #1912 to the changelog entry from r7924. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7926 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter01/changelog.xml | 15 ++++++++++++++- chapter07/symlinks.xml | 16 ++++++++++++++-- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 6936ca0ef..090031ade 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -36,13 +36,26 @@ --> + + 2007-02-18 + + + [bryan] - Fix obsolete syntax used in the example Udev rules + in section 7.12.2. Fixes the easy part of + #1963. Also re-add the + note about the backslash at the end of the udev rule lines. + + + + 2007-02-17 [bryan] - Use upstream's rule_generator rules exclusively for NIC naming, and generate the rules before configuring the network - script, so the user knows what NIC names to use. + script, so the user knows what NIC names to use. Fixes the rest of + #1912. [bryan] - Change from writing CD symlink rules files directly diff --git a/chapter07/symlinks.xml b/chapter07/symlinks.xml index 1407d553f..5846a46e0 100644 --- a/chapter07/symlinks.xml +++ b/chapter07/symlinks.xml @@ -122,13 +122,25 @@ cat > /etc/udev/rules.d/83-duplicate_devs.rules << EOF # Persistent symlinks for webcam and tuner -KERNEL=="video*", SYSFS{idProduct}=="1910", SYSFS{idVendor}=="0d81", \ +KERNEL=="video*", ATTRS{idProduct}=="1910", ATTRS{idVendor}=="0d81", \ SYMLINK+="webcam" -KERNEL=="video*", SYSFS{device}=="0x036f", SYSFS{vendor}=="0x109e", \ +KERNEL=="video*", ATTRS{device}=="0x036f", ATTRS{vendor}=="0x109e", \ SYMLINK+="tvtuner" EOF + + Be aware that Udev does not recognize the backslash for line + continuation. This example works properly because both the backslash + and newline are ignored by the shell. This makes the shell send each + rule to cat on only one line. (The shell ignores this sequence because + the EOF string used in the here-document redirection is not enclosed in + either double or single quotes. For more details, see the bash(1) + manpage, and search it for "Here Documents".) + If modifying Udev rules with an editor, be sure to leave each + rule on one physical line. + + The result is that /dev/video0 and /dev/video1 devices still refer randomly to the tuner and the web camera (and thus should never be used directly), but there are -- cgit v1.2.3-54-g00ecf