Changeset 2594 in MondoRescue for branches/2.2.10/mindi/rootfs/sbin/ide-opt
- Timestamp:
- Mar 17, 2010, 3:55:16 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mindi/rootfs/sbin/ide-opt
r2488 r2594 1 1 #!/bin/sh 2 2 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 4 echo -e -n "Optimizing IDE drive access..." 9 5 10 cdrom_lives_here=`cat $MINDI_CACHE/CDROM-LIVES-HERE`11 6 cdrom_lives_here=`cat $MINDI_CACHE/CDROM-LIVES-HERE 2> /dev/null` 7 if [ "$?" -ne "0" ] ; then 12 8 echo "I don't know where the CDROM lives. Optimization cancelled." 13 9 exit 1 14 10 fi 15 11 16 12 for dev in hda hdb hdc hdd hde hdf hdg hdh ; do 17 13 echo " " > /tmp/oid1.log 18 14 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 21 16 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 24 18 fi 25 19 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 20 done 21 echo "Done. See /tmp/oid.log for logs." 31 22 32 23 echo "'ide-opt' has tried to optimize IDE access. If you saw lots of warnings,"
Note:
See TracChangeset
for help on using the changeset viewer.