# modified make_resolv_conf () for Vyatta system below
make_resolv_conf() {
    if [ -n "$new_domain_name" ]; then
        logmsg info "Adding search-domain \"$new_domain_name\" via vyos-hostsd-client"
        /usr/bin/vyos-hostsd-client --set-host-name --search-domain $new_domain_name
    fi

    if [ -n "$new_dhcp6_domain_search" ]; then
        logmsg info "Adding search-domain \"$new_dhcp6_domain_search\" via vyos-hostsd-client"
        /usr/bin/vyos-hostsd-client --set-host-name --search-domain $new_dhcp6_domain_search
    fi

    if [ -n "$new_domain_name_servers" ] && ! cli-shell-api existsEffective system disable-dhcp-nameservers && [ "$new_domain_name_servers" != "$old_domain_name_servers" ] ; then
        logmsg info "Deleting nameservers with tag \"dhcp-$interface\" via vyos-hostsd-client"
        vyos-hostsd-client --delete-name-servers --tag dhcp-$interface
        NEW_SERVERS=""
        for nameserver in $new_domain_name_servers; do
            NEW_SERVERS="$NEW_SERVERS --name-server $nameserver"
        done
        logmsg info "Adding nameservers \"$NEW_SERVERS\" with tag \"dhcp-$interface\" via vyos-hostsd-client"
        /usr/bin/vyos-hostsd-client --add-name-servers $NEW_SERVERS --tag dhcp-$interface
    fi

    if [ -n "$new_dhcp6_name_servers" ] && ! cli-shell-api existsEffective system disable-dhcp-nameservers && [ "$new_dhcp6_name_servers" != "$old_dhcp6_name_servers" ] ; then
        logmsg info "Deleting nameservers with tag \"dhcpv6-$interface\" via vyos-hostsd-client"
        vyos-hostsd-client --delete-name-servers --tag dhcpv6-$interface
        NEW_SERVERS=""
        for nameserver in $new_dhcp6_name_servers; do
            NEW_SERVERS="$NEW_SERVERS --name-server $nameserver"
        done
        logmsg info "Adding nameservers \"$NEW_SERVERS\" with tag \"dhcpv6-$interface\" via vyos-hostsd-client"
        /usr/bin/vyos-hostsd-client --add-name-servers $NEW_SERVERS --tag dhcpv6-$interface
    fi

    if cli-shell-api existsEffective service dns forwarding; then
        logmsg info "Enabling DNS forwarding"
        /usr/libexec/vyos/conf_mode/dns_forwarding.py --dhclient
    fi
}