summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2012-12-31 10:39:47 -0500
committerjim-p <jimp@pfsense.org>2012-12-31 10:41:17 -0500
commit5486c48c370d60126666ad49ecb94400f91ea2e5 (patch)
tree4ee76b4f4e378d70fd0c6da702c7187322a3e329 /etc
parent5feadf7fca75866582af73834c8d2ab14edca456 (diff)
downloadpfsense-5486c48c370d60126666ad49ecb94400f91ea2e5.zip
pfsense-5486c48c370d60126666ad49ecb94400f91ea2e5.tar.gz
Make sure a device actually exists before trying to act on it. Fixes #2739
Diffstat (limited to 'etc')
-rwxr-xr-xetc/rc.disable_hdd_apm3
1 files changed, 3 insertions, 0 deletions
diff --git a/etc/rc.disable_hdd_apm b/etc/rc.disable_hdd_apm
index 58f3734..e9b3ba5 100755
--- a/etc/rc.disable_hdd_apm
+++ b/etc/rc.disable_hdd_apm
@@ -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
OpenPOWER on IntegriCloud