From c8a102da92e0d12c5682dc17562c01320554900c Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 16 Jul 2025 12:27:24 +1000 Subject: [PATCH] Fix ifconfig.sh script Add missing test for the variable 'a' being empty on linux. (cherry picked from commit 7ba91e382063280bedd6898aa6244c2183419a15) --- bin/tests/system/ifconfig.sh.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/tests/system/ifconfig.sh.in b/bin/tests/system/ifconfig.sh.in index 60dbf8b9e6..7930d67d02 100755 --- a/bin/tests/system/ifconfig.sh.in +++ b/bin/tests/system/ifconfig.sh.in @@ -82,11 +82,11 @@ up() { ;; *-*-linux*) if [ "$use_ip" ]; then - ip address add $a/24 dev lo:$int - ip link set dev lo:$int mtu 1500 + [ "$a" ] && ip address add $a/24 dev lo:$int + [ "$a" ] && ip link set dev lo:$int mtu 1500 [ "$aaaa" ] && ip address add $aaaa/64 dev lo else - ifconfig lo:$int $a up netmask 255.255.255.0 mtu 1500 + [ "$a" ] && ifconfig lo:$int $a up netmask 255.255.255.0 mtu 1500 [ "$aaaa" ] && ifconfig lo inet6 add $aaaa/64 fi ;;