From ac3fb3e9f40b43a9c9728864176c7613fb85badd Mon Sep 17 00:00:00 2001 From: Bryan Kadzban Date: Sat, 11 Nov 2006 00:49:19 +0000 Subject: Move custom CD symlink and custom NIC name rules files to 70-persistent-*.rules, and add ENV{GENERATED} to the CD symlink rules. Prevents Udev rule_generator stuff from conflicting. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7854 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter07/network.xml | 4 ++-- chapter07/symlinks.xml | 18 ++++++++++++------ 2 files changed, 14 insertions(+), 8 deletions(-) (limited to 'chapter07') diff --git a/chapter07/network.xml b/chapter07/network.xml index f03a2989a..6e4937d77 100644 --- a/chapter07/network.xml +++ b/chapter07/network.xml @@ -48,7 +48,7 @@ invent a descriptive name, such as realtek, and create Udev rules similar to the following: -cat > /etc/udev/rules.d/26-network.rules << EOF +cat > /etc/udev/rules.d/70-persistent-net.rules << EOF ACTION=="add", SUBSYSTEM=="net", SYSFS{address}=="00:e0:4c:12:34:56", \ NAME="realtek" ACTION=="add", SUBSYSTEM=="net", SYSFS{address}=="00:a0:c9:78:9a:bc", \ @@ -95,7 +95,7 @@ done Now create Udev rules similar to the following: -cat > /etc/udev/rules.d/26-network.rules << EOF +cat > /etc/udev/rules.d/70-persistent-net.rules << EOF ACTION=="add", SUBSYSTEM=="net", BUS=="pci", KERNELS=="0000:00:0c.0", \ NAME="realtek" ACTION=="add", SUBSYSTEM=="net", BUS=="pci", KERNELS=="0000:00:0d.0", \ diff --git a/chapter07/symlinks.xml b/chapter07/symlinks.xml index e8a27d7ef..f3c4b17c5 100644 --- a/chapter07/symlinks.xml +++ b/chapter07/symlinks.xml @@ -32,13 +32,13 @@ location of the device on the bus. If you are going to use the first approach, create a file similar to the following: -cat > /etc/udev/rules.d/82-cdrom.rules << EOF +cat > /etc/udev/rules.d/70-persistent-cd.rules << EOF # Custom CD-ROM symlinks SUBSYSTEM=="block", ENV{ID_MODEL}=="SAMSUNG_CD-ROM_SC-148F", \ - ENV{ID_REVISION}=="PS05", SYMLINK+="cdrom" + ENV{ID_REVISION}=="PS05", ENV{GENERATED}="1", SYMLINK+="cdrom" SUBSYSTEM=="block", ENV{ID_MODEL}=="PHILIPS_CDD5301", \ - ENV{ID_SERIAL}=="5VO1306DM00190", SYMLINK+="cdrom1 dvd" + ENV{ID_SERIAL}=="5VO1306DM00190", ENV{GENERATED}="1", SYMLINK+="cdrom1 dvd" EOF @@ -68,15 +68,21 @@ EOF /dev/srX devices, and sometimes to /dev/sgX, which is wrong. + The ENV{GENERATED}="1" key is needed to prevent the Udev + 75-cd-aliases-generator.rules file from overriding your custom + rules. + The second approach yields: -cat > /etc/udev/rules.d/82-cdrom.rules << EOF +cat > /etc/udev/rules.d/70-persistent-cd.rules << EOF # Custom CD-ROM symlinks SUBSYSTEM=="block", ENV{ID_TYPE}=="cd", \ - ENV{ID_PATH}=="pci-0000:00:07.1-ide-0:1", SYMLINK+="cdrom" + ENV{ID_PATH}=="pci-0000:00:07.1-ide-0:1", \ + ENV{GENERATED}="1", SYMLINK+="cdrom" SUBSYSTEM=="block", ENV{ID_TYPE}=="cd", \ - ENV{ID_PATH}=="pci-0000:00:07.1-ide-1:1", SYMLINK+="cdrom1 dvd" + ENV{ID_PATH}=="pci-0000:00:07.1-ide-1:1", \ + ENV{GENERATED}="1", SYMLINK+="cdrom1 dvd" EOF -- cgit v1.2.3-54-g00ecf