From 76fec586336775ef8e313df3f8c3981c6b4fdfa8 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Sun, 20 Nov 2011 21:27:38 -0600 Subject: [PATCH] pass the per-interface metric to resolvconf Reported-by: Alon Bar-Lev x-Gentoo-Bug: 364907 x-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?364907 --- net/system.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/net/system.sh b/net/system.sh index c4510788..65557fc6 100644 --- a/net/system.sh +++ b/net/system.sh @@ -46,7 +46,11 @@ _system_dns() # Support resolvconf if we have it. 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 printf "${buffer}" > /etc/resolv.conf chmod 644 /etc/resolv.conf