root/etc/rc.disable_hdd_apm @ eef01b14
1 | 92ac3b3d | jim-p | #!/bin/sh
|
---|---|---|---|
2 | |||
3 | ATAIDLE=/usr/local/sbin/ataidle |
||
4 | for i in /dev/ad?; do |
||
5 | b08e147f | jim-p | if [ ! -e ${i} ]; then |
6 | continue; |
||
7 | fi
|
||
8 | 92ac3b3d | jim-p | SUPPORTED=`${ATAIDLE} ${i} | grep "APM Supported" | awk '{print $3;}'` |
9 | if [ "${SUPPORTED}" = "yes" ] ; then |
||
10 | echo Disabling APM on $i |
||
11 | ${ATAIDLE} -P 0 ${i} |
||
12 | fi
|
||
13 | done
|