Changeset 1888 in MondoRescue for branches/2.2.5/mindi/rootfs/sbin/find-and-mount-cdrom
- Timestamp:
- Mar 5, 2008, 3:24:30 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.5/mindi/rootfs/sbin/find-and-mount-cdrom
r1885 r1888 24 24 res=$? 25 25 fi 26 if [ "$res" -ne "0" ] ; then 27 res=`cat /tmp/mount.log` 28 if [ "$res" = "mount: No medium found" ] ; then 29 [ ! "$SECOND_TRY" ] && LogIt "There is a CD-ROM drive at $device but no CD in it." 30 else 31 [ ! "$SECOND_TRY" ] && LogIt "It's not in $device; I'll keep looking" 26 if [ "$res" -ne "0" ] ; then 27 res=`cat /tmp/mount.log` 28 if [ "$res" = "mount: No medium found" ] ; then 29 [ ! "$SECOND_TRY" ] && LogIt "There is a CD-ROM drive at $device but no CD in it." 30 else 31 [ ! "$SECOND_TRY" ] && LogIt "It's not in $device; I'll keep looking" 32 fi 33 continue 32 34 fi 33 continue 34 fi 35 LogIt "$device has a CD-ROM in it" 36 umount /mnt/cdrom 37 ln -sf $device /dev/cdrom 38 if [ "$?" -ne "0" ]; then 39 LogIt "Unable to softlink $device to /dev/cdrom. That's weird." 40 continue 41 fi 35 LogIt "$device has a CD-ROM in it" 36 umount /mnt/cdrom 37 ln -sf $device /dev/cdrom 38 if [ "$?" -ne "0" ]; then 39 LogIt "Unable to softlink $device to /dev/cdrom. That's weird." 40 continue 41 fi 42 42 LogIt "CD-ROM found at $device" 43 mount /mnt/cdrom43 mount $device -t iso9660 -o ro /mnt/cdrom 2> /tmp/mount.log 44 44 if [ "$?" -ne "0" ] ; then 45 LogIt "Cannot mount /dev/cdrom (type $format) (dev=$device)"45 LogIt "Cannot mount /dev/cdrom (type iso9660) (dev=$device)" 46 46 continue 47 47 elif [ ! -d "/mnt/cdrom/archives" ] ; then … … 51 51 LogIt "$device is where the Mondo CD lives." 52 52 which hdparm > /dev/null 2> /dev/null && hdparm -u1 -c3 -d1 $device 53 return 054 fi53 return 0 54 fi 55 55 done 56 56 LogIt "Failed to find CD-ROM"
Note:
See TracChangeset
for help on using the changeset viewer.