resolv_conf_dir="$state_dir/resolv.conf"
NL="
"
+: ${resolvconf:=resolvconf}
build_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
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"