source: MondoRescue/branches/2.2.10/mindi/rootfs/sbin/ide-opt@ 2594

Last change on this file since 2594 was 2594, checked in by Bruno Cornec, 14 years ago

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
  • Property svn:keywords set to Id
  • Property svn:unix-mode set to 755
File size: 744 bytes
Line 
1#!/bin/sh
2
3> /tmp/oid.log
4echo -e -n "Optimizing IDE drive access..."
5
6cdrom_lives_here=`cat $MINDI_CACHE/CDROM-LIVES-HERE 2> /dev/null`
7if [ "$?" -ne "0" ] ; then
8 echo "I don't know where the CDROM lives. Optimization cancelled."
9 exit 1
10fi
11
12for dev in hda hdb hdc hdd hde hdf hdg hdh ; do
13 echo " " > /tmp/oid1.log
14 if [ "$cdrom_lives_here" = "$dev" ] ; then
15 hdparm -u 1 -d 1 /dev/$dev > /tmp/oid1.log 2> /dev/null
16 else
17 hdparm -u1 -d1 -c1 -m8 -W1 /dev/$dev > /tmp/oid1.log 2> /dev/null
18 fi
19 cat /tmp/oid1.log >> /tmp/oid.log
20done
21echo "Done. See /tmp/oid.log for logs."
22
23echo "'ide-opt' has tried to optimize IDE access. If you saw lots of warnings,"
24echo "optimization failed (not important, really); otherwise, it succeeded."
25
26exit 0
Note: See TracBrowser for help on using the repository browser.