summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2007-05-23 17:20:54 +0000
committerRoy Marples <uberlord@gentoo.org>2007-05-23 17:20:54 +0000
commita949d9b17f48da6b4a21eca3a806538a58ead3f6 (patch)
tree0348b0db2c9a4fc493011ccdf918692a98abb6fa /net-dns/dnsmasq/files
parentAdd ~x86-fbsd keyword. Bug #176906. (diff)
downloadhistorical-a949d9b17f48da6b4a21eca3a806538a58ead3f6.tar.gz
historical-a949d9b17f48da6b4a21eca3a806538a58ead3f6.tar.bz2
historical-a949d9b17f48da6b4a21eca3a806538a58ead3f6.zip
Fix the resolvconf script to work properly on FreeBSD.
Package-Manager: portage-2.1.2.7
Diffstat (limited to 'net-dns/dnsmasq/files')
-rw-r--r--net-dns/dnsmasq/files/resolvconf.dnsmasq12
1 files changed, 6 insertions, 6 deletions
diff --git a/net-dns/dnsmasq/files/resolvconf.dnsmasq b/net-dns/dnsmasq/files/resolvconf.dnsmasq
index 62fc73f4118f..ed9e01019847 100644
--- a/net-dns/dnsmasq/files/resolvconf.dnsmasq
+++ b/net-dns/dnsmasq/files/resolvconf.dnsmasq
@@ -33,7 +33,7 @@ DNSMASQRESOLV="/etc/dnsmasq-resolv.conf"
DNSMASQCONF="/etc/dnsmasq-resolvconf.conf"
NEWCONF="# Generated by resolvconf"
-NEWRESOLV="${NEWCONF}\nsearch"
+NEWRESOLV="${NEWCONF}\n"
# Using DBUS means that we never have to restart the daemon
# This is important as it means we should not drop DNS queries
@@ -48,7 +48,7 @@ grep -q "^Compile time options.*[[:space:]]DBus[[:space:]]" \
if [ -x /etc/init.d/dbus -a -x /etc/init.d/dnsmasq ] ; then
if /etc/init.d/dbus --quiet status && /etc/init.d/dnsmasq --quiet status ; then
DBUS=yes
- NEWCONF="${NEWCONF}\n# Domain specific servers will be sent over dbus\n\nenable-dbus"
+ NEWCONF="${NEWCONF}\n# Domain specific servers will be sent over dbus\n\nenable-dbus\n"
fi
fi
fi
@@ -75,16 +75,16 @@ for N in ${NEWSEARCH} ; do
esac
case "\n${NEWRESOLV}\n" in
*"\nnameserver ${N#*,}\n"*) ;;
- *) NEWRESOLV="${NEWRESOLV}\nnameserver ${N#*,}" ;;
+ *) NEWRESOLV="${NEWRESOLV}nameserver ${N#*,}\n" ;;
esac
done
for N in ${NEWNS} ; do
case "\n${NEWRESOLV}\n" in
*"\nnameserver ${N}\n") ;;
- *) NEWRESOLV="${NEWRESOLV}\nnameserver ${N}" ;;
+ *) NEWRESOLV="${NEWRESOLV}nameserver ${N}\n" ;;
esac
done
-NEWRESOLV="$(echo "${NEWRESOLV}" | sed -e "s/^search/${NEWSL:+search${NEWSL}}/g")"
+[ -n "${NEWSL}" ] && NEWRESOLV="${NEWRESOLV}search${NEWSL}\n"
DBUSDEST=
for DN in $(uniqify ${NEWDOMAIN}) ; do
@@ -101,7 +101,7 @@ for DN in $(uniqify ${NEWDOMAIN}) ; do
fi
DBUSDEST="${DBUSDEST} uint32:$(printf "%d" ${NUM}) string:${DN%,*}"
else
- NEWCONF="${NEWCONF}\nserver=/${DN%,*}/${DN#*,}"
+ NEWCONF="${NEWCONF}server=/${DN%,*}/${DN#*,}\n"
fi
done