Changeset c226182 for chapter07/symlinks.xml
- Timestamp:
- 08/03/2006 07:29:29 PM (18 years ago)
- Branches:
- 10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- bfa508ae
- Parents:
- a15464d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter07/symlinks.xml
ra15464d rc226182 33 33 approach, create a file similar to the following:</para> 34 34 35 <screen role="nodump"><userinput>cat >/etc/udev/rules.d/82-cdrom.rules << "EOF"35 <screen role="nodump"><userinput>cat >/etc/udev/rules.d/82-cdrom.rules << EOF 36 36 <literal> 37 37 # Custom CD-ROM symlinks 38 SUBSYSTEM=="block", ENV{ID_MODEL}=="SAMSUNG_CD-ROM_SC-148F", ENV{ID_REVISION}=="PS05", SYMLINK+="cdrom" 39 SUBSYSTEM=="block", ENV{ID_MODEL}=="PHILIPS_CDD5301", ENV{ID_SERIAL}=="5VO1306DM00190", SYMLINK+="cdrom1 dvd" 38 SUBSYSTEM=="block", ENV{ID_MODEL}=="SAMSUNG_CD-ROM_SC-148F", \ 39 ENV{ID_REVISION}=="PS05", SYMLINK+="cdrom" 40 SUBSYSTEM=="block", ENV{ID_MODEL}=="PHILIPS_CDD5301", \ 41 ENV{ID_SERIAL}=="5VO1306DM00190", SYMLINK+="cdrom1 dvd" 40 42 </literal> 41 43 EOF</userinput></screen> 44 45 <note> 46 <para>Although the examples in this book work properly, be aware 47 that Udev does not recognize the backslash for line continuation. 48 If modifying Udev rules with an editor, be sure to leave each rule 49 on one physical line.</para> 50 </note> 42 51 43 52 <para>This way, the symlinks will stay correct even if you move the drives … … 50 59 <para>The SUBSYSTEM=="block" key is needed in order to avoid 51 60 matching SCSI generic devices. Without it, in the case with SCSI 52 CD-ROMs, the symlinks will sometimes point to the correct 61 CD-ROMs, the symlinks will sometimes point to the correct 53 62 <filename>/dev/srX</filename> devices, and sometimes to 54 63 <filename>/dev/sgX</filename>, which is wrong.</para> 55 64 56 65 <para>The second approach yields:</para> 57 66 58 <screen role="nodump"><userinput>cat >/etc/udev/rules.d/82-cdrom.rules << "EOF"67 <screen role="nodump"><userinput>cat >/etc/udev/rules.d/82-cdrom.rules << EOF 59 68 <literal> 60 69 # Custom CD-ROM symlinks 61 SUBSYSTEM=="block", ENV{ID_TYPE}=="cd", ENV{ID_PATH}=="pci-0000:00:07.1-ide-0:1", SYMLINK+="cdrom" 62 SUBSYSTEM=="block", ENV{ID_TYPE}=="cd", ENV{ID_PATH}=="pci-0000:00:07.1-ide-1:1", SYMLINK+="cdrom1 dvd" 70 SUBSYSTEM=="block", ENV{ID_TYPE}=="cd", \ 71 ENV{ID_PATH}=="pci-0000:00:07.1-ide-0:1", SYMLINK+="cdrom" 72 SUBSYSTEM=="block", ENV{ID_TYPE}=="cd", \ 73 ENV{ID_PATH}=="pci-0000:00:07.1-ide-1:1", SYMLINK+="cdrom1 dvd" 63 74 </literal> 64 75 EOF</userinput></screen> … … 106 117 <para>Then write rules that create the symlinks, e.g.:</para> 107 118 108 <screen role="nodump"><userinput>cat >/etc/udev/rules.d/83-duplicate_devs.rules << "EOF"119 <screen role="nodump"><userinput>cat >/etc/udev/rules.d/83-duplicate_devs.rules << EOF 109 120 <literal> 110 121 # Persistent symlinks for webcam and tuner 111 KERNEL=="video*", SYSFS{idProduct}=="1910", SYSFS{idVendor}=="0d81", SYMLINK+="webcam" 112 KERNEL=="video*", SYSFS{device}=="0x036f", SYSFS{vendor}=="0x109e", SYMLINK+="tvtuner" 122 KERNEL=="video*", SYSFS{idProduct}=="1910", SYSFS{idVendor}=="0d81", \ 123 SYMLINK+="webcam" 124 KERNEL=="video*", SYSFS{device}=="0x036f", SYSFS{vendor}=="0x109e", \ 125 SYMLINK+="tvtuner" 113 126 </literal> 114 127 EOF</userinput></screen>
Note:
See TracChangeset
for help on using the changeset viewer.