Ignore:
Timestamp:
Apr 10, 2008, 1:13:58 AM (16 years ago)
Author:
Bruno Cornec
Message:

merge -r 1842:1889 2.2.5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mindi/rootfs/sbin/find-and-mount-cdrom

    r1842 r1903  
    2525        fi
    2626        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
    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
     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
     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
    4242        LogIt "CD-ROM found at $device"
    43         mount /mnt/cdrom
     43        mount $device -t iso9660 -o ro /mnt/cdrom 2> /tmp/mount.log
    4444        if [ "$?" -ne "0" ] ; then
    45             LogIt "Cannot mount /dev/cdrom (type $format) (dev=$device)"
     45            LogIt "Cannot mount /dev/cdrom (type iso9660) (dev=$device)"
    4646            continue
    4747        elif [ ! -d "/mnt/cdrom/archives" ] ; then
     
    5151            LogIt "$device is where the Mondo CD lives."
    5252            which hdparm > /dev/null 2> /dev/null && hdparm -u1 -c3 -d1 $device
    53         return 0
    54     fi
     53            return 0
     54        fi
    5555    done
    5656    LogIt "Failed to find CD-ROM"
     
    8080    exit 0
    8181fi
     82
     83LogIt "Unable to find and mount your CD-ROM" 1
     84LogIt "You probably miss the correct driver to support your CD-ROM drive" 1
     85exit 2
Note: See TracChangeset for help on using the changeset viewer.