r1590 - / trunk/udev

jim at linuxfromscratch.org jim at linuxfromscratch.org
Sun May 14 11:44:45 PDT 2006


Author: jim
Date: 2006-05-14 12:44:44 -0600 (Sun, 14 May 2006)
New Revision: 1590

Modified:
   /
   trunk/udev/
   trunk/udev/35-helper.rules
   trunk/udev/cdsymlink_helper.sh
Log:
 r3469 at server (orig r1624):  jim | 2006-05-14 11:40:16 -0700
  r3468 at server:  jim | 2006-05-14 11:39:43 -0700
  Updates to udev cdsymlink_helper.sh
 



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


Property changes on: trunk/udev
___________________________________________________________________
Name: svk:merge
   - 38c7b366-470d-0410-a457-935707c16d9b:/udev:3465
3949c430-d905-0410-97b6-f115d20341b5:/udev:1348
3b7552df-c20a-0410-b7e1-d7eaf1be8828:/udev:1263
   + 38c7b366-470d-0410-a457-935707c16d9b:/udev:3468
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-05-14 18:44:34 UTC (rev 1589)
+++ trunk/udev/35-helper.rules	2006-05-14 18:44:44 UTC (rev 1590)
@@ -23,14 +23,13 @@
 BUS=="scsi",	KERNEL=="scd[a-z]", ACTION=="add", IMPORT="cdrom_id --export $tempnode"
 BUS=="scsi",	KERNEL=="sg[0-9]*", ACTION=="add", DRIVER=="sr", GROUP="cdrom"
 
-BUS=="ide", 	ENV{ID_CDROM}=="?*", SYMLINK+="cdrom-temp", GROUP="cdrom"
-BUS=="ide",	ENV{ID_CDROM_CD_R}=="?*", SYMLINK+="cdr-temp"
-BUS=="ide",	ENV{ID_CDROM_CD_RW}=="?*", SYMLINK+="cdrw-temp"
-BUS=="ide",	ENV{ID_CDROM_DVD}=="?*", SYMLINK+="dvd-temp"
-BUS=="ide",	ENV{ID_CDROM_DVD_R}=="?*", SYMLINK+="dvdrw-temp"
-BUS=="ide",	KERNEL=="hd[a-z]", ACTION=="add", RUN+="cdsymlink_helper.sh %k"
+BUS=="ide",	ENV{ID_CDROM}=="?*", PROGRAM="cdsymlink_helper.sh %k", SYMLINK+="cdrom%c", GROUP="cdrom"
+BUS=="ide",	ENV{ID_CDROM_CD_R}=="?*", PROGRAM="cdsymlink_helper.sh %k", SYMLINK+="cdr%c"
+BUS=="ide",	ENV{ID_CDROM_CD_RW}=="?*", PROGRAM="cdsymlink_helper.sh %k", SYMLINK+="cdrw%c"
+BUS=="ide",	ENV{ID_CDROM_DVD}=="?*", PROGRAM="cdsymlink_helper.sh %k", SYMLINK+="dvd%c"
+BUS=="ide",	ENV{ID_CDROM_DVD_R}=="?*", PROGRAM="cdsymlink_helper.sh %k", SYMLINK+="dvdrw%c"
 
-BUS=="scsi", 	ENV{ID_CDROM}=="?*", SYMLINK+="cdrom%n", GROUP="cdrom"
+BUS=="scsi",	ENV{ID_CDROM}=="?*", SYMLINK+="cdrom%n", GROUP="cdrom"
 BUS=="scsi",	ENV{ID_CDROM_CD_R}=="?*", SYMLINK+="cdr%n"
 BUS=="scsi",	ENV{ID_CDROM_CD_RW}=="?*", SYMLINK+="cdrw%n"
 BUS=="scsi",	ENV{ID_CDROM_DVD}=="?*", SYMLINK+="dvd%n"
@@ -38,3 +37,4 @@
 
 # adds floppy devices
 KERNEL=="fd[0-9]*", ACTION=="add", SYSFS{cmos}=="*", RUN+="create_floppy_devices -c -t $sysfs{cmos} -m %M /dev/%k"t
+

Modified: trunk/udev/cdsymlink_helper.sh
===================================================================
--- trunk/udev/cdsymlink_helper.sh	2006-05-14 18:44:34 UTC (rev 1589)
+++ trunk/udev/cdsymlink_helper.sh	2006-05-14 18:44:44 UTC (rev 1590)
@@ -20,50 +20,13 @@
 	mesg Bad invocation: \$1 is not set
 	exit 1
 fi
-case $ACTION in
-	add)
-		if [ -e /dev/cdrom-temp ]; then
-			FILES="`ls /sys/bus/ide/drivers/ide-cdrom | grep 1.`"
-			for file in $FILES; do
-				TEST="`ls /sys/bus/ide/drivers/ide-cdrom/$file | grep -c $KERN_NAME`"
-				if [ "$TEST" = "1" ]; then
-					link="`echo $file | cut -f2 -d.`"
-					if [ -e /dev/cdrom-temp ]; then
-						mv /dev/cdrom-temp /dev/cdrom$link
-					fi
-					if [ -e /dev/cdr-temp ]; then
-						mv /dev/cdr-temp /dev/cdr$link
-					fi
-					if [ -e /dev/cdrw-temp ]; then
-						mv /dev/cdrw-temp /dev/cdrw$link
-					fi
-					if [ -e /dev/dvd-temp ]; then
-						mv /dev/dvd-temp /dev/dvd$link
-					fi
-					if [ -e /dev/dvdr-temp ]; then
-						mv /dev/dvdr-temp /dev/dvdr$link
-					fi
-					if [ -e /dev/dvdrw-temp ]; then
-						mv /dev/dvdrw-temp /dev/dvdrw$link
-					fi
-				fi
-			done
+echo "here" > /tmp/cdrom
+FILES="`ls /sys/bus/ide/drivers/ide-cdrom | grep 1.`"
+	for file in $FILES; do
+		TEST="`ls /sys/bus/ide/drivers/ide-cdrom/$file | grep -c $KERN_NAME`"
+		if [ "$TEST" = "1" ]; then
+			link="`echo $file | cut -f2 -d.`"
+			echo $link
+			echo "link = $link" >> /tmp/cdrom
 		fi
-	;;
-
-	remove)
-		FILES="`ls /sys/bus/ide/drivers/ide-cdrom | grep 1.`"
-		echo "at remove" > /tmp/cdrom
-		for file in $FILES; do
-			TEST="`find /sys/bus/ide/drivers/ide-cdrom/$file -name $KERN_NAME`"
-			if [ "$TEST" != "" ]; then
-				link="`echo $file | cut -f2 -d.`"
-				rm /dev/cdrom$link /dev/cdr$link /dev/cdrw$link /dev/dvd$link /dev/dvdrw$link
-			fi
-		done
-	;;
-
-	*)
-	exit 1
-	;;
-esac
+	done




More information about the cross-lfs mailing list