#---------------------------------------------------------------------------- # /var/install/include/nm-get-dns - configuration of dns # # Creation : 2025-10-29 hbfl # Last Update: $Id$ # # Copyright (c) 2001-@@YEAR@@ the eisfair team, team(at)eisfair(dot)org # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------- # # get the dns responder # included from NetworkManager: nm-get-devices, nm-get-bonding, brigde, etc.. # local dns_file=$(/usr/bin/find /etc/sysconfig/network/forwarder -maxdepth 1 -type f -printf '%f\n') case "X${dns_file}" in Xbind) . /etc/config.d/bind9 s_search='' separator='' idxb=1 while [ ${idxb} -le ${BIND9_N:-0} ] do eval zone_name='${BIND9_'${idxb}'_NAME}' s_search="${s_search}${separator}${zone_name}" separator=';' idxb=$((${idxb} + 1)) done if [ -z "${s_search}" ] then s_search="${DOMAIN_NAME}" fi echo "dns-search=${s_search:-$(hostanme -d)};" separator='' for dns_server in ${DNS_SERVER} do if [ "${dns_server}" != "127.0.0.1" ] then e_dns="${e_dns}${separator}${dns_server}" separator=';' separator2=';' fi done echo "dns=127.0.0.1${separator2}${e_dns};" ;; X) if [ -n "${DOMAIN_NAME}" ] then echo "dns-search=${DOMAIN_NAME};" fi separator='' for dns_server in ${DNS_SERVER} do e_dns="${e_dns}${separator}${dns_server}" separator=';' done echo "dns=${e_dns};" ;; esac