Ignore:
Timestamp:
08/03/2006 07:29:29 PM (18 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
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
Message:

Ported updates from 6.2 branch.
Small tags fixes.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7758 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter07/symlinks.xml

    ra15464d rc226182  
    3333    approach, create a file similar to the following:</para>
    3434
    35 <screen role="nodump"><userinput>cat &gt;/etc/udev/rules.d/82-cdrom.rules &lt;&lt;"EOF"
     35<screen role="nodump"><userinput>cat &gt;/etc/udev/rules.d/82-cdrom.rules &lt;&lt; EOF
    3636<literal>
    3737# 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"
     38SUBSYSTEM=="block", ENV{ID_MODEL}=="SAMSUNG_CD-ROM_SC-148F", \
     39    ENV{ID_REVISION}=="PS05", SYMLINK+="cdrom"
     40SUBSYSTEM=="block", ENV{ID_MODEL}=="PHILIPS_CDD5301", \
     41    ENV{ID_SERIAL}=="5VO1306DM00190", SYMLINK+="cdrom1 dvd"
    4042</literal>
    4143EOF</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>
    4251
    4352    <para>This way, the symlinks will stay correct even if you move the drives
     
    5059    <para>The SUBSYSTEM==&quot;block&quot; key is needed in order to avoid
    5160    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
    5362    <filename>/dev/srX</filename> devices, and sometimes to
    5463    <filename>/dev/sgX</filename>, which is wrong.</para>
    55  
     64
    5665    <para>The second approach yields:</para>
    5766
    58 <screen role="nodump"><userinput>cat &gt;/etc/udev/rules.d/82-cdrom.rules &lt;&lt;"EOF"
     67<screen role="nodump"><userinput>cat &gt;/etc/udev/rules.d/82-cdrom.rules &lt;&lt; EOF
    5968<literal>
    6069# 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"
     70SUBSYSTEM=="block", ENV{ID_TYPE}=="cd", \
     71    ENV{ID_PATH}=="pci-0000:00:07.1-ide-0:1", SYMLINK+="cdrom"
     72SUBSYSTEM=="block", ENV{ID_TYPE}=="cd", \
     73    ENV{ID_PATH}=="pci-0000:00:07.1-ide-1:1", SYMLINK+="cdrom1 dvd"
    6374</literal>
    6475EOF</userinput></screen>
     
    106117    <para>Then write rules that create the symlinks, e.g.:</para>
    107118
    108 <screen role="nodump"><userinput>cat &gt;/etc/udev/rules.d/83-duplicate_devs.rules &lt;&lt;"EOF"
     119<screen role="nodump"><userinput>cat &gt;/etc/udev/rules.d/83-duplicate_devs.rules &lt;&lt; EOF
    109120<literal>
    110121# 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"
     122KERNEL=="video*", SYSFS{idProduct}=="1910", SYSFS{idVendor}=="0d81", \
     123    SYMLINK+="webcam"
     124KERNEL=="video*", SYSFS{device}=="0x036f", SYSFS{vendor}=="0x109e", \
     125    SYMLINK+="tvtuner"
    113126</literal>
    114127EOF</userinput></screen>
Note: See TracChangeset for help on using the changeset viewer.