Assuming you are trying to improve on the SUSE hdd APM fix ( http://en.opensuse.org/Disk_Power_Management ),
a temporary workaround to achieve this functionality would be to use the script in the attachment in /etc/pm/sleep.d/
This script will check whether we are resuming from suspend/hibernate (thats what sleep.d is for, doh) and in case we are,
it will check the AC state and than allow you to set APM according to whether we run on battery od on AC power.
Assuming you are trying to improve on the SUSE hdd APM fix ( http:// en.opensuse. org/Disk_ Power_Managemen t ),
a temporary workaround to achieve this functionality would be to use the script in the attachment in /etc/pm/sleep.d/
This script will check whether we are resuming from suspend/hibernate (thats what sleep.d is for, doh) and in case we are,
it will check the AC state and than allow you to set APM according to whether we run on battery od on AC power.