Changeset f0da65f
- Timestamp:
- May 14, 2006, 11:40:16 AM (19 years ago)
- Branches:
- clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
- Children:
- e6c3117
- Parents:
- 93a4751
- Location:
- udev
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
udev/35-helper.rules
r93a4751 rf0da65f 24 24 BUS=="scsi", KERNEL=="sg[0-9]*", ACTION=="add", DRIVER=="sr", GROUP="cdrom" 25 25 26 BUS=="ide", ENV{ID_CDROM}=="?*", SYMLINK+="cdrom-temp", GROUP="cdrom" 27 BUS=="ide", ENV{ID_CDROM_CD_R}=="?*", SYMLINK+="cdr-temp" 28 BUS=="ide", ENV{ID_CDROM_CD_RW}=="?*", SYMLINK+="cdrw-temp" 29 BUS=="ide", ENV{ID_CDROM_DVD}=="?*", SYMLINK+="dvd-temp" 30 BUS=="ide", ENV{ID_CDROM_DVD_R}=="?*", SYMLINK+="dvdrw-temp" 31 BUS=="ide", KERNEL=="hd[a-z]", ACTION=="add", RUN+="cdsymlink_helper.sh %k" 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" 32 31 33 BUS=="scsi", 32 BUS=="scsi", ENV{ID_CDROM}=="?*", SYMLINK+="cdrom%n", GROUP="cdrom" 34 33 BUS=="scsi", ENV{ID_CDROM_CD_R}=="?*", SYMLINK+="cdr%n" 35 34 BUS=="scsi", ENV{ID_CDROM_CD_RW}=="?*", SYMLINK+="cdrw%n" … … 39 38 # adds floppy devices 40 39 KERNEL=="fd[0-9]*", ACTION=="add", SYSFS{cmos}=="*", RUN+="create_floppy_devices -c -t $sysfs{cmos} -m %M /dev/%k"t 40 -
udev/cdsymlink_helper.sh
r93a4751 rf0da65f 21 21 exit 1 22 22 fi 23 case $ACTION in 24 add) 25 if [ -e /dev/cdrom-temp ]; then 26 FILES="`ls /sys/bus/ide/drivers/ide-cdrom | grep 1.`" 27 for file in $FILES; do 28 TEST="`ls /sys/bus/ide/drivers/ide-cdrom/$file | grep -c $KERN_NAME`" 29 if [ "$TEST" = "1" ]; then 30 link="`echo $file | cut -f2 -d.`" 31 if [ -e /dev/cdrom-temp ]; then 32 mv /dev/cdrom-temp /dev/cdrom$link 33 fi 34 if [ -e /dev/cdr-temp ]; then 35 mv /dev/cdr-temp /dev/cdr$link 36 fi 37 if [ -e /dev/cdrw-temp ]; then 38 mv /dev/cdrw-temp /dev/cdrw$link 39 fi 40 if [ -e /dev/dvd-temp ]; then 41 mv /dev/dvd-temp /dev/dvd$link 42 fi 43 if [ -e /dev/dvdr-temp ]; then 44 mv /dev/dvdr-temp /dev/dvdr$link 45 fi 46 if [ -e /dev/dvdrw-temp ]; then 47 mv /dev/dvdrw-temp /dev/dvdrw$link 48 fi 49 fi 50 done 23 echo "here" > /tmp/cdrom 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 echo "link = $link" >> /tmp/cdrom 51 31 fi 52 ;; 53 54 remove) 55 FILES="`ls /sys/bus/ide/drivers/ide-cdrom | grep 1.`" 56 echo "at remove" > /tmp/cdrom 57 for file in $FILES; do 58 TEST="`find /sys/bus/ide/drivers/ide-cdrom/$file -name $KERN_NAME`" 59 if [ "$TEST" != "" ]; then 60 link="`echo $file | cut -f2 -d.`" 61 rm /dev/cdrom$link /dev/cdr$link /dev/cdrw$link /dev/dvd$link /dev/dvdrw$link 62 fi 63 done 64 ;; 65 66 *) 67 exit 1 68 ;; 69 esac 32 done
Note:
See TracChangeset
for help on using the changeset viewer.