diff options
Diffstat (limited to 'chapter07/symlinks.xml')
-rw-r--r-- | chapter07/symlinks.xml | 16 |
1 files changed, 14 insertions, 2 deletions
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 @@ <screen role="nodump"><userinput>cat > /etc/udev/rules.d/83-duplicate_devs.rules << EOF <literal> # 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" </literal> EOF</userinput></screen> + <note> + <para>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".)</para> + <para>If modifying Udev rules with an editor, be sure to leave each + rule on one physical line.</para> + </note> + <para>The result is that <filename>/dev/video0</filename> and <filename>/dev/video1</filename> devices still refer randomly to the tuner and the web camera (and thus should never be used directly), but there are |