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:51 -0500 |
commit | b08e147f433b689870206a1b98f91d716bd13c9a (patch) | |
tree | e0aec36dd05e0d5c6ab35ffc8f170256af443c56 /etc/rc.disable_hdd_apm | |
parent | 0e39c30376cce25e86af9afa519e4ad0aa9a2d65 (diff) | |
download | pfsense-b08e147f433b689870206a1b98f91d716bd13c9a.zip pfsense-b08e147f433b689870206a1b98f91d716bd13c9a.tar.gz |
Make sure a device actually exists before trying to act on it. Fixes #2739
Diffstat (limited to 'etc/rc.disable_hdd_apm')
-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 |