Changeset 1903 in MondoRescue for branches/stable/mindi/rootfs/sbin


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

merge -r 1842:1889 2.2.5

Location:
branches/stable/mindi/rootfs/sbin
Files:
3 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
  • branches/stable/mindi/rootfs/sbin/init

    r1842 r1903  
    124124        LogIt "$tapedev failed to act as extended data disk for booting." 1
    125125        LogIt "Please specify an alternate tape device," 1
    126         LogIt "or hit <Enter> to boot from CD/floppies." 1
     126        LogIt "or hit <Enter> to boot from another media." 1
    127127        echo -en "---> "
    128128        read tapedev
     
    140140    if [ "$res" -ne "0" ] ; then
    141141        cd /
    142         LogIt "Failed to use tape as extended datadisk. Reverting to cd." 1
     142        LogIt "Failed to use tape as extended datadisk. Reverting to another media." 1
    143143        HandleCDROM
    144144        res=$?
     
    155155
    156156
    157 HHandleCDROM() {
     157HandleCDROM() {
    158158    # Just in case we have an iLO ensure we will map it correctly
    159159    echo "$DENY_MODS" | grep -q "usb-storage "
     
    186186        LogIt "OK, I am running on a CD-ROM. Good." 3
    187187        CD_MOUNTED_OK=yes
    188     elif [ "$res" -eq "1" ] ; then
    189         LogIt "OK, I am running on floppies. Good." 3
    190         CD_MOUNTED_OK=""
    191     else
    192         LogIt "OK, I am falling back to floppy mode." 3
    193         LogIt "(You may not have the right drivers" 3
    194         LogIt "to support the hardware on which we are running)" 3
    195         LogIt "That means you'll have to copy the data disk images from" 3
    196         LogIt "the CD/hard disk/whatever to physical 1.44MB disks and" 3
    197         LogIt "insert them, one after the other. Please see the manual." 3
    198         LogIt "The images are in /images on the CD, or /root/images/mindi" 3
    199         LogIt "on your hard disk. Your archives are probably fine but" 3
    200         LogIt "your tape streamer and/or CD-ROM drive are eccentric. :-)" 3
     188    else
     189        LogIt "You probably not have the right drivers" 3
     190        LogIt "to support the hardware on which we are running" 3
     191        LogIt "Your archives are probably fine but" 3
     192        LogIt "your tape streamer and/or CD-ROM drive are unsupported at that point." 3
    201193        CD_MOUNTED_OK=""
    202194    fi
     
    316308    # Depending on udevd version it gives back the hand or not :-(
    317309    /sbin/udevd --daemon &
    318     sleep 2
     310    sleep 5
    319311    mkdir -p /dev/.udev/queue/
    320312    if [ -x /sbin/udevtrigger ]; then
     
    619611mount -o remount rw /
    620612[ ! "$GROOVY" ] && Die "I'm not groovy!"
    621 for i in $GROOVY /mnt/floppy /mnt/cdrom /mnt/isodir /var/local/petris /tmp/isodir; do
     613for i in $GROOVY /mnt/cdrom /mnt/isodir /var/local/petris /tmp/isodir; do
    622614    mkdir -p $i
    623615done
     
    781773else
    782774    LogIt "backup-media-type is not specified in config file."
    783     LogIt "I think this CD/floppy has no archives on it."
     775    LogIt "I think this media has no archives on it."
    784776fi
    785777if grep "RESTORE" /proc/cmdline > /dev/null 2> /dev/null ; then
  • branches/stable/mindi/rootfs/sbin/untar

    r1770 r1903  
    1414# ---------------------- main ----------------------
    1515
    16 mountpoint=/mnt/floppy
     16mountpoint=/dev/null
    1717[ -e "/tmp/CDROM-LIVES-HERE" ] && mountpoint=/mnt/cdrom/images
    1818[ "$#" -eq "2" ] || Die "untar <tarball> <untar_to>"
     
    2222if [ -e "/tmp/CDROM-LIVES-HERE" ] ; then
    2323    [ -e "$tarball" ] || LogIt "Can't find CD's $tarball" 1
    24 else
    25     while [ ! -f "$tarball" ] ; do
    26         echo -e -n "Please insert data (floppy) disk #$diskno and press ENTER."
    27         read line
    28         mount /dev/fd0 -t ext2 -o ro $mountpoint
    29         [ -f "$tarball" ] || umount $mountpoint ; # unmount if tarball not on disk
    30         echo -en "Working..."
    31     done
    3224fi
    3325
Note: See TracChangeset for help on using the changeset viewer.