From aa89f3a0a39d2951c5791a85c4504d8a3fa26ecf Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 21 Sep 2025 15:07:25 +0200 Subject: [PATCH] fix: Simplify conditional check --- src/network.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network.sh b/src/network.sh index 9d7c76c..abb6e21 100644 --- a/src/network.sh +++ b/src/network.sh @@ -440,7 +440,7 @@ getInfo() { IP6="" # shellcheck disable=SC2143 - if [ -f /proc/net/if_inet6 ] && [ -n "$(ifconfig -a | grep inet6)" ]; then + if [ -f /proc/net/if_inet6 && -n "$(ifconfig -a | grep inet6)" ]; then IP6=$(ip -6 addr show dev "$VM_NET_DEV" scope global up) [ -n "$IP6" ] && IP6=$(echo "$IP6" | sed -e's/^.*inet6 \([^ ]*\)\/.*$/\1/;t;d' | head -n 1) fi