From 60a34d8b11dd50b2cd4e0e2208bd7c5e0fc48b71 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 8 Mar 2021 15:40:00 +0100 Subject: [PATCH] fix(network-legacy): silence getargs --- modules.d/35network-legacy/ifup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules.d/35network-legacy/ifup.sh b/modules.d/35network-legacy/ifup.sh index aae979f6f7..2aaf393af4 100755 --- a/modules.d/35network-legacy/ifup.sh +++ b/modules.d/35network-legacy/ifup.sh @@ -514,12 +514,12 @@ if [ -z "$NO_AUTO_DHCP" ] && [ ! -e /tmp/net.${netif}.up ]; then # No ip lines, no bootdev -> default to dhcp ip=$(getarg ip) - if getargs 'ip=dhcp6' || [ -z "$ip" -a "$netroot" = "dhcp6" ]; then + if getargs 'ip=dhcp6' >/dev/null || [ -z "$ip" -a "$netroot" = "dhcp6" ]; then load_ipv6 do_dhcp -6 ret=$? fi - if getargs 'ip=dhcp' || [ -z "$ip" -a "$netroot" != "dhcp6" ]; then + if getargs 'ip=dhcp' >/dev/null || [ -z "$ip" -a "$netroot" != "dhcp6" ]; then do_dhcp -4 ret=$? fi