]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix ifconfig.sh script
authorMark Andrews <marka@isc.org>
Wed, 16 Jul 2025 02:27:24 +0000 (12:27 +1000)
committerMark Andrews <marka@isc.org>
Wed, 16 Jul 2025 22:30:11 +0000 (08:30 +1000)
Add missing test for the variable 'a' being empty on linux.

(cherry picked from commit 7ba91e382063280bedd6898aa6244c2183419a15)

bin/tests/system/ifconfig.sh.in

index 60dbf8b9e6c99ced4bacdf4c69604fabfe2718ea..7930d67d02e61a52aa7849a16627b008f20505e3 100755 (executable)
@@ -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
       ;;