#!/bin/sh # info from: # http://www.linuxsa.org.au/mailing-list/2001-04/358.html # http://chlug.org/hdparm_howto.php if [ "$1" == "start" ] ; then dma=1 what="Enabling" else dma=0 what="Disabling" fi echo -n "$what DMA and MaxMultSect: " for disk in hda hdc hde hdg hdi hdl hdn hdo ; do mms=`hdparm -i /dev/$disk | grep MaxMultSect | sed 's/.*MaxMultSect=//' | cut -d, -f1` echo -n "$disk/$mms " hdparm -q -d $dma -m$mms -c3 -k1 /dev/$disk done echo