#!/bin/sh

case "$1" in
        true)
                echo "**setting min_power"
                # Set the SATA to min_power
                echo min_power > /sys/class/scsi_host/host0/link_power_management_policy
                echo min_power > /sys/class/scsi_host/host1/link_power_management_policy
                echo min_power > /sys/class/scsi_host/host2/link_power_management_policy
                echo min_power > /sys/class/scsi_host/host3/link_power_management_policy
                ;;
        false)
                echo "**setting max_performance"
		# Set the SATA to max performance
		echo max_performance > /sys/class/scsi_host/host0/link_power_management_policy
		echo max_performance > /sys/class/scsi_host/host1/link_power_management_policy
		echo max_performance > /sys/class/scsi_host/host2/link_power_management_policy
		echo max_performance > /sys/class/scsi_host/host3/link_power_management_policy
                ;;
esac

exit 0
