- Timestamp:
- May 14, 2006, 5:41:04 PM (19 years ago)
- Branches:
- clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
- Children:
- 4631c1c
- Parents:
- 4dd194e2
- Location:
- udev
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
udev/35-helper.rules
r4dd194e2 rdf6532c 24 24 BUS=="scsi", KERNEL=="sg[0-9]*", ACTION=="add", DRIVER=="sr", GROUP="cdrom" 25 25 26 BUS=="ide", ENV{ID_CDROM}=="?*", PROGRAM="cdsymlink_helper.sh %k ", SYMLINK+="cdrom%c", GROUP="cdrom"27 BUS=="ide", ENV{ID_CDROM_CD_R}=="?*", PROGRAM="cdsymlink_helper.sh %k ", SYMLINK+="cdr%c"28 BUS=="ide", ENV{ID_CDROM_CD_RW}=="?*", PROGRAM="cdsymlink_helper.sh %k ", SYMLINK+="cdrw%c"29 BUS=="ide", ENV{ID_CDROM_DVD}=="?*", PROGRAM="cdsymlink_helper.sh %k ", SYMLINK+="dvd%c"30 BUS=="ide", ENV{ID_CDROM_DVD_R}=="?*", PROGRAM="cdsymlink_helper.sh %k ", SYMLINK+="dvdrw%c"26 BUS=="ide", ENV{ID_CDROM}=="?*", PROGRAM="cdsymlink_helper.sh %k ide", SYMLINK+="cdrom%c" 27 BUS=="ide", ENV{ID_CDROM_CD_R}=="?*", PROGRAM="cdsymlink_helper.sh %k ide", SYMLINK+="cdr%c" 28 BUS=="ide", ENV{ID_CDROM_CD_RW}=="?*", PROGRAM="cdsymlink_helper.sh %k ide", SYMLINK+="cdrw%c" 29 BUS=="ide", ENV{ID_CDROM_DVD}=="?*", PROGRAM="cdsymlink_helper.sh %k ide", SYMLINK+="dvd%c" 30 BUS=="ide", ENV{ID_CDROM_DVD_R}=="?*", PROGRAM="cdsymlink_helper.sh %k ide", SYMLINK+="dvdrw%c" 31 31 32 BUS=="scsi", ENV{ID_CDROM}=="?*", SYMLINK+="cdrom%n", GROUP="cdrom"33 BUS=="scsi", ENV{ID_CDROM_CD_R}=="?*", SYMLINK+="cdr%n"34 BUS=="scsi", ENV{ID_CDROM_CD_RW}=="?*", SYMLINK+="cdrw%n"35 BUS=="scsi", ENV{ID_CDROM_DVD}=="?*", SYMLINK+="dvd%n"36 BUS=="scsi", ENV{ID_CDROM_DVD_R}=="?*", SYMLINK+="dvdrw%n"32 BUS=="scsi", ENV{ID_CDROM}=="?*", PROGRAM="cdsymlink_helper.sh %k scsi", SYMLINK+="cdrom%c" 33 BUS=="scsi", ENV{ID_CDROM_CD_R}=="?*", PROGRAM="cdsymlink_helper.sh %k scsi", SYMLINK+="cdr%c" 34 BUS=="scsi", ENV{ID_CDROM_CD_RW}=="?*", PROGRAM="cdsymlink_helper.sh %k scsi", SYMLINK+="cdrw%c" 35 BUS=="scsi", ENV{ID_CDROM_DVD}=="?*", PROGRAM="cdsymlink_helper.sh %k scsi", SYMLINK+="dvd%c" 36 BUS=="scsi", ENV{ID_CDROM_DVD_R}=="?*", PROGRAM="cdsymlink_helper.sh %k scsi", SYMLINK+="dvdrw%c" 37 37 38 38 # adds floppy devices -
udev/cdsymlink_helper.sh
r4dd194e2 rdf6532c 16 16 17 17 KERN_NAME="$1" 18 BUS="$2" 19 test=0 18 20 19 21 if [ "$KERN_NAME" = "" ]; then … … 22 24 fi 23 25 24 FILES="`ls /sys/bus/ide/drivers/ide-cdrom | grep 1.`" 25 for file in $FILES; do 26 TEST="`ls /sys/bus/ide/drivers/ide-cdrom/$file | grep -c $KERN_NAME`" 27 if [ "$TEST" = "1" ]; then 28 link="`echo $file | cut -f2 -d.`" 29 echo $link 30 fi 31 done 26 if [ "$BUS" = "ide" ]; then 27 FILES="`ls /sys/bus/ide/drivers/ide-cdrom | grep '\.' `" 28 for file in $FILES; do 29 TEST="`ls /sys/bus/ide/drivers/ide-cdrom/$file | grep -c $KERN_NAME`" 30 if [ "$TEST" = "1" ]; then 31 link="`echo $file | cut -f2 -d.`" 32 while [ $test -lt 1 ] ; do 33 if [ -e /dev/cdrom$link ]; then 34 link=$[$link+1] 35 else 36 test=1 37 echo $link 38 fi 39 done 40 fi 41 done 42 fi 43 44 if [ "$BUS" = "scsi" ]; then 45 link=$KERN_NAME 46 while [ $test -lt 1 ] ; do 47 if [ -e /dev/cdrom$link ]; then 48 link=$[$link+1] 49 else 50 test=1 51 echo $link 52 fi 53 done 54 fi 55
Note:
See TracChangeset
for help on using the changeset viewer.