Make sure a device actually exists before trying to act on it. Fixes #2739
This commit is contained in:
parent
0e39c30376
commit
b08e147f43
|
@ -2,6 +2,9 @@
|
|||
|
||||
ATAIDLE=/usr/local/sbin/ataidle
|
||||
for i in /dev/ad?; do
|
||||
if [ ! -e ${i} ]; then
|
||||
continue;
|
||||
fi
|
||||
SUPPORTED=`${ATAIDLE} ${i} | grep "APM Supported" | awk '{print $3;}'`
|
||||
if [ "${SUPPORTED}" = "yes" ] ; then
|
||||
echo Disabling APM on $i
|
||||
|
|
Reference in New Issue