Changeset 2913 in MondoRescue for branches/3.0/mindi/rootfs/etc/init.d/rcS


Ignore:
Timestamp:
Dec 9, 2011, 8:26:23 PM (12 years ago)
Author:
Bruno Cornec
Message:
  • Fix #358 by using an external program (hpsa_obdr_mode) which can set the mode of the tape to CD-ROM or Sequential at will.

That program will have to be downloaded from http://cciss.sf.net

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/mindi/rootfs/etc/init.d/rcS

    r2908 r2913  
    652652EnableCcissIfAppropriate() {
    653653    local f
     654
     655    # In some cases, the OBDR tape remains in CD-ROM mode. This branch solves that issue (#498)
     656    if [ "`grep -i 'obdr ' /tmp/mondo-restore.cfg 2>/dev/null`" ] && [ -x /usr/bin/hpsa_obdr_mode ]; then
     657            for lun in `/usr/bin/hpsa_obdr_mode -m query /dev/cciss/* 2>&1 | grep "is an OBDR device" | cut -d' ' -f4`; do
     658            /usr/bin/hpsa_obdr_mode -m query -l $lun /dev/cciss/* 2>&1 | grep -q "is in CD-ROM mode"
     659            if [ $? -eq 0 ]; then
     660                # This tape/lun should be brought back in Sequential mode
     661                LogIt "Putting back tape $lun in Sequential mode..."
     662                /usr/bin/hpsa_obdr_mode -m tape -l $lun /dev/cciss/* 2>&1 > /dev/null
     663            fi
     664        done
     665    fi
     666
     667    # Now engage all Smart Array controllers to detect attached devices
    654668    for f in /proc/driver/cciss/cciss* ; do
    655669        LogIt "Engaging $f"
Note: See TracChangeset for help on using the changeset viewer.