aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-08-31 18:37:59 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-08-31 18:37:59 +0000
commite407eedc064aba5ce4e2580d39a7b5926f5e9a7e (patch)
tree75a276721dce779d5aff09d0edee356de4debe3e
parenta975f64d97a5b41e0f4f9410d84d84eeb1aa6918 (diff)
parent1fc29fe3a470659b7c9cc0f2b34b63d0d3258835 (diff)
downloaddhcpcd-e407eedc064aba5ce4e2580d39a7b5926f5e9a7e.tar.gz
Merge "Don't fork and exec ls when the shell can stat files."
-rwxr-xr-xdhcpcd-run-hooks2
1 files changed, 1 insertions, 1 deletions
diff --git a/dhcpcd-run-hooks b/dhcpcd-run-hooks
index 8b68c69..a39a133 100755
--- a/dhcpcd-run-hooks
+++ b/dhcpcd-run-hooks
@@ -25,7 +25,7 @@ do
*/[0-9][0-9]"-${skip}.sh") continue 2;;
esac
done
- if ls "${hook}" >/dev/null 2>&1; then
+ if [ -f "${hook}" ]; then
. "${hook}"
fi
done