diff options
author | jim-p <jimp@pfsense.org> | 2012-12-31 10:39:47 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2012-12-31 10:41:17 -0500 |
commit | 5486c48c370d60126666ad49ecb94400f91ea2e5 (patch) | |
tree | 4ee76b4f4e378d70fd0c6da702c7187322a3e329 /etc | |
parent | 5feadf7fca75866582af73834c8d2ab14edca456 (diff) | |
download | pfsense-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-x | etc/rc.disable_hdd_apm | 3 |
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 |