pass the per-interface metric to resolvconf

Reported-by: Alon Bar-Lev <alon.barlev@gmail.com>
x-Gentoo-Bug: 364907
x-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?364907
This commit is contained in:
William Hubbs 2011-11-20 21:27:38 -06:00
parent d8bbeb184f
commit 76fec58633

View File

@ -46,7 +46,11 @@ _system_dns()
# Support resolvconf if we have it. # Support resolvconf if we have it.
if [ -x /sbin/resolvconf ]; then if [ -x /sbin/resolvconf ]; then
printf "${buffer}" | resolvconf -a "${IFACE}" x="-a ${IFACE}"
if [ -n "${metric_${IFVAR}}" ]; then
x="${x} -m ${metric_${IFVAR}}"
fi
printf "${buffer}" | resolvconf ${x}
else else
printf "${buffer}" > /etc/resolv.conf printf "${buffer}" > /etc/resolv.conf
chmod 644 /etc/resolv.conf chmod 644 /etc/resolv.conf