aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sh/udhcpc-hook.sh.in')
-rw-r--r--sh/udhcpc-hook.sh.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/sh/udhcpc-hook.sh.in b/sh/udhcpc-hook.sh.in
index e4300c1..85ea09d 100644
--- a/sh/udhcpc-hook.sh.in
+++ b/sh/udhcpc-hook.sh.in
@@ -19,7 +19,7 @@ update_dns()
for i in ${dns} ; do
conf="${conf}nameserver ${i}\n"
done
- if [ -x /sbin/resolvconf ] ; then
+ if command -v resolvconf >/dev/null; then
printf "${conf}" | resolvconf -a ${interface}
else
printf "${conf}" > /etc/resolv.conf
@@ -110,7 +110,7 @@ deconfig()
fi
if ! peer_var "${PEER_DNS}" ; then
- [ -x /sbin/resolvconf ] && resolvconf -d "${interface}"
+ command -v resolvconf >/dev/null && resolvconf -d "${interface}"
fi
}