Fix ifconfig.sh script

Add missing test for the variable 'a' being empty on linux.

(cherry picked from commit 7ba91e3820)
This commit is contained in:
Mark Andrews 2025-07-16 12:27:24 +10:00
parent d9d8b64189
commit c8a102da92

View file

@ -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
;;