wok diff pm-utils/stuff/harddrive.patch @ rev 14185

asterisk: remove wrong error trigger
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Mar 11 19:01:08 2013 +0100 (2013-03-11)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/pm-utils/stuff/harddrive.patch	Mon Mar 11 19:01:08 2013 +0100
     1.3 @@ -0,0 +1,52 @@
     1.4 +--- harddrive.orig
     1.5 ++++ harddrive.new
     1.6 +@@ -23,7 +23,7 @@
     1.7 + $0: Control hard drive spindown, write caching, 
     1.8 +     power management and acoustic management.
     1.9 + 
    1.10 +-This hook has 8 tuneable parameters:
    1.11 ++This hook has 6 tuneable parameters:
    1.12 + DRIVE_SPINDOWN_VALUE_AC = time until a drive will spin down on AC
    1.13 + Defaults to 0, which disables drive spindown.
    1.14 + DRIVE_SPINDOWN_VALUE_BAT = time until a drive will spin down on battery
    1.15 +@@ -45,14 +45,6 @@
    1.16 + 
    1.17 + See the -B option on the hdparm man page
    1.18 + 
    1.19 +-Drive acoustic management:
    1.20 +-DRIVE_ACOUSTIC_MGMT_AC = Drive Acoustic Management value on AC
    1.21 +-Defaults to 254 for max head speed.
    1.22 +-DRIVE_ACOUSTIC_MGMT_BAT = Drive Acoustic Management value on battery
    1.23 +-Defaults to 128 for max quietness.
    1.24 +-
    1.25 +-See the -M option on the hdparm man page. 
    1.26 +-
    1.27 + Drives to manage:
    1.28 + DRIVE_LIST = the list of hard drives to manage.
    1.29 + Defaults to "/dev/[hs]d[a-z]", which will manage up to the first 25 drives.
    1.30 +@@ -62,8 +54,7 @@
    1.31 + 
    1.32 + harddrive_ac () {
    1.33 +     for dev in $DRIVE_LIST; do
    1.34 +-	# disable write caching, do not spin down the drive, disable APM 
    1.35 +-	# and acoustic management, and sync everything to drive.
    1.36 ++	# enable write caching, do not spin down the drive, disable APM 
    1.37 + 	printf "Disabling hard drive power management for %s..." "$dev"
    1.38 + 	hdparm -W $DRIVE_WRITE_CACHE_AC \
    1.39 + 	    -S $DRIVE_SPINDOWN_VALUE_AC \
    1.40 +@@ -75,12 +66,12 @@
    1.41 + 
    1.42 + harddrive_battery() {
    1.43 +     for dev in $DRIVE_LIST; do
    1.44 +-	# disable write caching, enable acoustic management
    1.45 ++	# disable write caching, spin down the drive, enable APM
    1.46 ++	# and sync everything to drive.
    1.47 + 	printf "Enabling power management for %s..." "$dev"
    1.48 + 	hdparm -W $DRIVE_WRITE_CACHE_BAT \
    1.49 + 	    -S $DRIVE_SPINDOWN_VALUE_BAT \
    1.50 +-	    -B $DRIVE_POWER_MGMT_BAT \
    1.51 +-	    -M $DRIVE_ACOUSTIC_MGMT_BAT -F $dev >/dev/null 2>&1 \
    1.52 ++	    -B $DRIVE_POWER_MGMT_BAT  -f $dev >/dev/null 2>&1 \
    1.53 + 	    && echo Done. || echo Failed.
    1.54 +     done
    1.55 + }