From: Roy Marples Date: Thu, 28 Jul 2016 10:02:42 +0000 (+0000) Subject: Allow resolvconf to be user tunable. X-Git-Tag: v6.11.2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67b4a20f55a8ca0b32e12c53af30ccb310dab912;p=thirdparty%2Fdhcpcd.git Allow resolvconf to be user tunable. --- diff --git a/dhcpcd-hooks/20-resolv.conf b/dhcpcd-hooks/20-resolv.conf index de9013bc..e4db368d 100644 --- a/dhcpcd-hooks/20-resolv.conf +++ b/dhcpcd-hooks/20-resolv.conf @@ -9,6 +9,7 @@ resolv_conf_dir="$state_dir/resolv.conf" NL=" " +: ${resolvconf:=resolvconf} build_resolv_conf() { @@ -162,9 +163,9 @@ add_resolv_conf() for x in ${new_domain_name_servers}; do conf="${conf}nameserver $x$NL" done - if type resolvconf >/dev/null 2>&1; then + if type "$resolvconf" >/dev/null 2>&1; then [ -n "$ifmetric" ] && export IF_METRIC="$ifmetric" - printf %s "$conf" | resolvconf -a "$ifname" + printf %s "$conf" | "$resolvconf" -a "$ifname" return $? fi @@ -178,8 +179,8 @@ add_resolv_conf() remove_resolv_conf() { - if type resolvconf >/dev/null 2>&1; then - resolvconf -d "$ifname" -f + if type "$resolvconf" >/dev/null 2>&1; then + "$resolvconf" -d "$ifname" -f else if [ -e "$resolv_conf_dir/$ifname" ]; then rm -f "$resolv_conf_dir/$ifname"