commit | 1fc29fe3a470659b7c9cc0f2b34b63d0d3258835 | [log] [tgz] |
---|---|---|
author | Elliott Hughes <enh@google.com> | Fri Aug 28 21:29:52 2015 -0700 |
committer | Elliott Hughes <enh@google.com> | Fri Aug 28 21:29:52 2015 -0700 |
tree | 75a276721dce779d5aff09d0edee356de4debe3e | |
parent | a975f64d97a5b41e0f4f9410d84d84eeb1aa6918 [diff] |
Don't fork and exec ls when the shell can stat files. I doubt this has any measurable impact, but there's no reason to be wasteful. Change-Id: I94a153df9073ac5eea4c310e03b2d5f360791276
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 @@ */[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