r1270 - / trunk/udev

jim at linuxfromscratch.org jim at linuxfromscratch.org
Tue Mar 14 15:58:32 PST 2006


Author: jim
Date: 2006-03-14 16:58:31 -0700 (Tue, 14 Mar 2006)
New Revision: 1270

Removed:
   trunk/udev/check-cdrom.sh
Modified:
   /
   trunk/udev/
   trunk/udev/35-helper.rules
   trunk/udev/50-udev.rules
   trunk/udev/Makefile
   trunk/udev/udev.makechanges
Log:
 r2567 at server (orig r1270):  jim | 2006-03-14 15:47:21 -0800
  r2566 at server:  jim | 2006-03-14 15:46:21 -0800
  Updated cdrom detection
 



Property changes on: 
___________________________________________________________________
Name: svk:merge
   - b6734a72-470d-0410-b049-f317dca95413:/:1269
   + b6734a72-470d-0410-b049-f317dca95413:/:1270


Property changes on: trunk/udev
___________________________________________________________________
Name: svk:merge
   - 3949c430-d905-0410-97b6-f115d20341b5:/udev:1348
3b7552df-c20a-0410-b7e1-d7eaf1be8828:/udev:1263
   + 38c7b366-470d-0410-a457-935707c16d9b:/udev:2566
3949c430-d905-0410-97b6-f115d20341b5:/udev:1348
3b7552df-c20a-0410-b7e1-d7eaf1be8828:/udev:1263

Modified: trunk/udev/35-helper.rules
===================================================================
--- trunk/udev/35-helper.rules	2006-03-14 06:10:01 UTC (rev 1269)
+++ trunk/udev/35-helper.rules	2006-03-14 23:58:31 UTC (rev 1270)
@@ -18,11 +18,18 @@
 SUBSYSTEM=="firmware",	ACTION=="add", RUN+="firmware_helper"
 
 # check cdrom helper
-KERNEL=="hd[a-z]", 	BUS=="ide", SYSFS{removable}=="1", RESULT=="cdrom", SYMLINK+="cdrom%e"
-KERNEL=="hd[a-z]", 	BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/lib/udev/check-cdrom.sh %k DVD", SYMLINK+="dvd%e"
-KERNEL=="sr[0-9]*",	BUS=="scsi", PROGRAM=="/lib/udev/check-cdrom.sh %k DVD", SYMLINK+="dvd%e"
-KERNEL=="hd[a-z]", 	BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/lib/udev/check-cdrom.sh %k CD-R", SYMLINK+="cdwriter%e"
-KERNEL=="sr[0-9]*", 	BUS=="scsi", PROGRAM=="/lib/udev/check-cdrom.sh %k CD-R", SYMLINK+="cdwriter%e"
-KERNEL=="hd[a-z]", 	BUS=="ide", SYSFS{removable}=="1", PROGRAM="/lib/udev/check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter%e"
-KERNEL=="sr[0-9]*", 	BUS=="scsi", PROGRAM=="/lib/udev/check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter%e"
+BUS=="ide",	KERNEL=="hd[a-z]", ACTION=="add", IMPORT="/sbin/cdrom_id --export $tempnode"
+BUS=="scsi",	KERNEL=="sr[0-9]*", ACTION=="add", IMPORT="/sbin/cdrom_id --export $tempnode"
+BUS=="scsi",	KERNEL="scd[a-z]", ACTION=="add", IMPORT="/sbin/cdrom_id --export $tempnode"
+BUS=="scsi",	KERNEL=="sg[0-9]*", ACTION=="add", DRIVER=="sr", GROUP="cdrom"
 
+ENV{ID_CDROM}=="?*",		SYMLINK+="cdrom%m", GROUP="cdrom"
+ENV{ID_CDROM_CD_R}=="?*",	SYMLINK+="cdr%m"
+ENV{ID_CDROM_CD_RW}=="?*",	SYMLINK+="cdrw%m"
+ENV{ID_CDROM_DVD}=="?*",	SYMLINK+="dvd%m"
+ENV{ID_CDROM_DVD_R}=="?*",	SYMLINK+="dvdrw%m"
+
+# Run network stuff when the network device is loaded
+ACTION=="add", SUBSYSTEM=="net", ENV{INTERFACE}=="*", RUN+="network_helper.sh"
+ACTION=="remove", SUBSYSTEM=="net", ENV{INTERFACE}=="*", RUN+="network_helper.sh"
+

Modified: trunk/udev/50-udev.rules
===================================================================
--- trunk/udev/50-udev.rules	2006-03-14 06:10:01 UTC (rev 1269)
+++ trunk/udev/50-udev.rules	2006-03-14 23:58:31 UTC (rev 1270)
@@ -161,8 +161,3 @@
 # libusb device access
 SUBSYSTEM=="usb_device", 	PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0644"
 
-# cdrom
-KERNEL=="sr[0-9]*",             GROUP="cdrom", SYMLINK+="cdrom%e"
-KERNEL=="scd[0-9]*",            GROUP="cdrom", SYMLINK+="cdrom%e"
-KERNEL=="pcd[0-9]*",            GROUP="cdrom", SYMLINK+="cdrom%e"
-

Modified: trunk/udev/Makefile
===================================================================
--- trunk/udev/Makefile	2006-03-14 06:10:01 UTC (rev 1269)
+++ trunk/udev/Makefile	2006-03-14 23:58:31 UTC (rev 1270)
@@ -29,7 +29,6 @@
 
 scripts:
 	install -m ${SCRIPTMODE} load_floppy_module.sh ${DESTDIR}/lib/udev/load_floppy_module.sh
-	install -m ${SCRIPTMODE} check-cdrom.sh ${DESTDIR}/lib/udev/check-cdrom.sh
 
 boot:
 	install -d ${DESTDIR}/usr/share/udev

Deleted: trunk/udev/check-cdrom.sh
===================================================================
--- trunk/udev/check-cdrom.sh	2006-03-14 06:10:01 UTC (rev 1269)
+++ trunk/udev/check-cdrom.sh	2006-03-14 23:58:31 UTC (rev 1270)
@@ -1,39 +0,0 @@
-#!/bin/bash
-
-pos=0
-n=0
-sp="$1"
-what="$2"
-found=0
-
-[ -e /proc/sys/dev/cdrom/info ] || exit 1
-
-/bin/cat /proc/sys/dev/cdrom/info | { 
-	while read line; do
-		if [ "$found" = "0" -a "${line/drive name:}" != "$line" ]; then
-			set ${line/drive name:}	
-			while [ $# -gt 0 ]; do
-				pos=$[$pos+1]
-				if [ "$1" == "$sp" ]; then
-					found=1
-					break
-				fi
-				shift
-			done
-			[ "$found" = "0" ] && exit 1
-		elif [ "${line/$what:}" != "$line" ]; then
-			set ${line##*$what:}	
-			while [ $# -gt 0 ]; do
-				n=$[$n+1]
-				if [ "$n" == "$pos" ]; then
-					if [ "$1" = "1" ]; then
-						exit 0
-					fi
-					break
-				fi
-				shift
-			done
-		fi    
-	done
-exit 1
-}

Modified: trunk/udev/udev.makechanges
===================================================================
--- trunk/udev/udev.makechanges	2006-03-14 06:10:01 UTC (rev 1269)
+++ trunk/udev/udev.makechanges	2006-03-14 23:58:31 UTC (rev 1270)
@@ -10,9 +10,9 @@
 
 Second, you will need to use udev 079 or above, here is the build instructions
 you must use to get full functionality.
-make EXTRAS="extras/firmware extras/scsi_id extras/volume_id extras/ata_id extras/usb_id extras/edd_id extras/dasd_id" udevdir=/dev
+make EXTRAS="extras/firmware extras/cdrom_id extras/scsi_id extras/volume_id extras/ata_id extras/usb_id extras/edd_id extras/dasd_id" udevdir=/dev
 
-make EXTRAS="extras/firmware extras/scsi_id extras/volume_id extras/ata_id extras/usb_id extras/edd_id extras/dasd_id" udevdir=/dev install
+make EXTRAS="extras/firmware extras/cdrom_id extras/scsi_id extras/volume_id extras/ata_id extras/usb_id extras/edd_id extras/dasd_id" udevdir=/dev install
 cp extras/path_id /sbin
 cp extras/eventrecorder.sh /lib/udev
 rm -rf /etc/udev/rules.d/*




More information about the cross-lfs mailing list