diff options
author | Mike Gilbert <floppym@gentoo.org> | 2023-05-30 16:12:12 -0400 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-09-10 16:14:49 +0100 |
commit | 75b7229ffa861c8472abe64733a657409b5d929d (patch) | |
tree | 3cb632ad371cb27667f1cd5ecdde2936df523bc6 /sh | |
parent | Makefile.inc: version 0.7.5 (diff) | |
download | netifrc-75b7229ffa861c8472abe64733a657409b5d929d.tar.gz netifrc-75b7229ffa861c8472abe64733a657409b5d929d.tar.bz2 netifrc-75b7229ffa861c8472abe64733a657409b5d929d.zip |
Remove absolute paths from commands
Bug: https://bugs.gentoo.org/889922
Bug: https://bugs.gentoo.org/893290
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sh')
-rw-r--r-- | sh/udhcpc-hook.sh.in | 4 |
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 } |