summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/dhcpcd.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/dhcpcd.sh b/net/dhcpcd.sh
index d2382a8..4054c42 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"