From ac604eb2e37cb67a1133cc9bf78287c755fc70a4 Mon Sep 17 00:00:00 2001 Message-Id: From: Philipp Hahn Date: Thu, 8 Mar 2018 11:27:59 +0100 Subject: [PATCH] Allow multiple routers Organization: Univention GmbH, Bremen, Germany According to "$router" is "A *list* of routers", so do not quote it to allow IFS splitting. Running the following command by hand shows the error: udhcpc -i ens3 -V d-i -T 1 -t 59 -O router -f ... ip: an inet address is expected rather than "192.168.10.13 192.168.10.14" Fixes: 574355f4380bd7ede11e5110fffefb51f1294b0b Cc: Otavio Salvador --- debian/tree/busybox-udeb/etc/udhcpc/default.script | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/debian/tree/busybox-udeb/etc/udhcpc/default.script b/debian/tree/busybox-udeb/etc/udhcpc/default.script index a47bdae7e..3c33effd3 100755 --- a/debian/tree/busybox-udeb/etc/udhcpc/default.script +++ b/debian/tree/busybox-udeb/etc/udhcpc/default.script @@ -59,7 +59,7 @@ case "$1" in bound|renew) do_hostname - + ip -4 addr add "$ip/$subnet" dev "$interface" if [ -n "$mtu" ]; then @@ -69,8 +69,10 @@ case "$1" in # special case for /32 subnets, use onlink when adding routes [ ".$subnet" = .255.255.255.255 ] \ && onlink=onlink || onlink= - for r in "$router"; do - ip -4 route add default via "$r" $onlink + metric=0 + for r in $router; do + ip -4 route add default via "$r" $onlink metric $metric + metric=$((1+$metric)) done do_resolv_conf -- 2.11.0