From: Florian Eckert Date: Fri, 22 Aug 2025 08:42:30 +0000 (+0200) Subject: odhcp6c: use && in if statement on dynamic interfaces X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=b0d1a6aa389b2e944c16a42de57ffb8ecd7a44f8;p=openwrt%2Fstaging%2Fblocktrron.git odhcp6c: use && in if statement on dynamic interfaces It es recommended to use '&&' to improve readability on 'if' statement. Signed-off-by: Florian Eckert --- diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.script b/package/network/ipv6/odhcp6c/files/dhcpv6.script index bbdd80c904..a664aa13aa 100755 --- a/package/network/ipv6/odhcp6c/files/dhcpv6.script +++ b/package/network/ipv6/odhcp6c/files/dhcpv6.script @@ -165,7 +165,7 @@ setup_interface () { [ -n "$ZONE" ] || ZONE=$(fw3 -q network $INTERFACE 2>/dev/null) - if [ "$IFACE_MAP" != 0 -a -n "$MAPTYPE" -a -n "$MAPRULE" ]; then + if [ "$IFACE_MAP" != 0 ] && [ -n "$MAPTYPE" ] && [ -n "$MAPRULE" ]; then [ -z "$IFACE_MAP" -o "$IFACE_MAP" = 1 ] && IFACE_MAP=${INTERFACE}_4 json_init json_add_string name "$IFACE_MAP" @@ -182,7 +182,7 @@ setup_interface () { [ -n "$IFACE_MAP_DELEGATE" ] && json_add_boolean delegate "$IFACE_MAP_DELEGATE" json_close_object ubus call network add_dynamic "$(json_dump)" - elif [ -n "$AFTR" -a "$IFACE_DSLITE" != 0 -a -f /lib/netifd/proto/dslite.sh ]; then + elif [ -n "$AFTR" ] && [ "$IFACE_DSLITE" != 0 ] && [ -f /lib/netifd/proto/dslite.sh ]; then [ -z "$IFACE_DSLITE" -o "$IFACE_DSLITE" = 1 ] && IFACE_DSLITE=${INTERFACE}_4 json_init json_add_string name "$IFACE_DSLITE" @@ -197,7 +197,7 @@ setup_interface () { [ -n "$IFACE_DSLITE_DELEGATE" ] && json_add_boolean delegate "$IFACE_DSLITE_DELEGATE" json_close_object ubus call network add_dynamic "$(json_dump)" - elif [ "$IFACE_464XLAT" != 0 -a -f /lib/netifd/proto/464xlat.sh ]; then + elif [ "$IFACE_464XLAT" != 0 ] && [ -f /lib/netifd/proto/464xlat.sh ]; then [ -z "$IFACE_464XLAT" -o "$IFACE_464XLAT" = 1 ] && IFACE_464XLAT=${INTERFACE}_4 json_init json_add_string name "$IFACE_464XLAT"