Add search domain to /etc/resolv.conf at boot time

unbound does not append the local domain to the request
any more (like dnsmasq did). Therefore, the client needs
to do that if desired.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
Arne Fitzenreiter
2016-10-02 15:32:14 +02:00
parent b29c97b168
commit cc60329d88
2 changed files with 11 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ etc/system-release
etc/issue
etc/login.defs
etc/rc.d/init.d/dhcp
etc/rc.d/init.d/localnet
etc/rc.d/init.d/network
etc/rc.d/init.d/networking/red.down/05-update-dns-forwarders
etc/rc.d/init.d/networking/red.up/05-update-dns-forwarders

View File

@@ -15,6 +15,13 @@
. /etc/sysconfig/rc
. ${rc_functions}
write_resolv_conf() {
(
[ -n "${DOMAINNAME}" ] && echo "search ${DOMAINNAME}"
echo "nameserver 127.0.0.1"
) > /etc/resolv.conf
}
case "${1}" in
start)
eval $(/usr/local/bin/readhash /var/ipfire/main/settings)
@@ -32,6 +39,9 @@ case "${1}" in
domainname ${DOMAINNAME}
evaluate_retval
fi
# Update resolv.conf
write_resolv_conf
;;
stop)