aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-11-25 02:07:22 +0000
committerRoy Marples <roy@marples.name>2009-11-25 02:07:22 +0000
commit4df8770a90049267475dac78b4217d1970c200e6 (patch)
tree0a1d2bb5e78f0a195255763203bd739e78e626dd
parentec38bbbddab5e3fc23f2b53161f42ce8551bce80 (diff)
Only add metric to dhcpcd if not given.
Fixes Gentoo #294312
-rw-r--r--net/dhcpcd.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/dhcpcd.sh b/net/dhcpcd.sh
index d2382a8c..4054c42a 100644
--- a/net/dhcpcd.sh
+++ b/net/dhcpcd.sh
@@ -56,8 +56,11 @@ dhcpcd_start()
esac
done
- # Add our route metric
- [ "${metric:-0}" != "0" ] && args="${args} -m ${metric}"
+ # Add our route metric if not given
+ case " $args " in
+ *" -m "*) ;;
+ *) [ "${metric:-0}" != 0 ] && args="$args -m $metric";;
+ esac
# Bring up DHCP for this interface
ebegin "Running dhcpcd"