Changeset 2594 in MondoRescue for branches/2.2.10/mindi/rootfs/sbin/ide-opt


Ignore:
Timestamp:
Mar 17, 2010, 3:55:16 AM (14 years ago)
Author:
Bruno Cornec
Message:

r3735@localhost: bruno | 2010-03-14 19:50:12 +0100

  • Avoids remaining error messages at restore time in new mindi
  • Adapt group file to include latest one needed by udev
  • Explicitely add a dep on libnss_files.so.2 needed for uid resolution at restore time
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.10/mindi/rootfs/sbin/ide-opt

    r2488 r2594  
    11#!/bin/sh
    22
    3 #echo "Optimize access to IDE drives? (Type 'YES' or just press <enter>)"
    4 #echo "Warning - this can result in filesystem corruption."
    5 #read response
    6 #if [ "$response" = "YES" ] || [ "$response" = "yes" ] ; then
    7     > /tmp/oid.log
    8     echo -e -n "Optimizing IDE drive access..."
     3> /tmp/oid.log
     4echo -e -n "Optimizing IDE drive access..."
    95
    10     cdrom_lives_here=`cat $MINDI_CACHE/CDROM-LIVES-HERE`
    11     if [ "$?" -ne "0" ] ; then
     6cdrom_lives_here=`cat $MINDI_CACHE/CDROM-LIVES-HERE 2> /dev/null`
     7if [ "$?" -ne "0" ] ; then
    128    echo "I don't know where the CDROM lives. Optimization cancelled."
    139    exit 1
    14     fi
     10fi
    1511
    16     for dev in hda hdb hdc hdd hde hdf hdg hdh ; do
     12for dev in hda hdb hdc hdd hde hdf hdg hdh ; do
    1713    echo " " > /tmp/oid1.log
    1814    if [ "$cdrom_lives_here" = "$dev" ] ; then
    19 # -c 1
    20         hdparm -u 1 -d 1 /dev/$dev > /tmp/oid1.log 2> /dev/null
     15        hdparm -u 1 -d 1 /dev/$dev > /tmp/oid1.log 2> /dev/null
    2116    else
    22 # -X34 -X66
    23         hdparm -u1 -d1 -c1 -m8 -W1 /dev/$dev > /tmp/oid1.log 2> /dev/null
     17        hdparm -u1 -d1 -c1 -m8 -W1 /dev/$dev > /tmp/oid1.log 2> /dev/null
    2418    fi
    2519    cat /tmp/oid1.log >> /tmp/oid.log
    26     done
    27     echo "Done. See /tmp/oid.log for logs."
    28 #else
    29 #    echo "Fair enough. I shan't optimize IDE access."
    30 #fi
     20done
     21echo "Done. See /tmp/oid.log for logs."
    3122
    3223echo "'ide-opt' has tried to optimize IDE access. If you saw lots of warnings,"
Note: See TracChangeset for help on using the changeset viewer.