]> git.ipfire.org Git - people/ms/network.git/blobdiff - hooks/zones/bridge.ports/ethernet
Some fixes when STP is disabled.
[people/ms/network.git] / hooks / zones / bridge.ports / ethernet
index c249e1787ca90e09ab62c93d368cb516c5731e62..7383dc47d1ab777a4896d06f0723274f1d5d067b 100755 (executable)
@@ -138,13 +138,15 @@ function _status() {
        printf "        %-10s - " "${port}"
        if ! device_is_up ${port}; then
                echo -ne "${COLOUR_DOWN}   DOWN   ${COLOUR_NORMAL}"
-       else
+       elif [ -n "$(stp_bridge_get_protocol ${zone})" ]; then
                local state=$(stp_port_get_state ${zone} ${port})
                local colour="COLOUR_STP_${state}"
                printf "${!colour}%10s${COLOUR_NORMAL}" ${state}
 
                echo -n " - DSR: $(stp_port_get_designated_root ${zone} ${port})"
                echo -n " - Cost: $(stp_port_get_cost ${zone} ${port})"
+       else
+               echo -ne "${COLOUR_UP}    UP    ${COLOUR_NORMAL}"
        fi
 
        echo