From 7fdca09480a1c276ab9247cfd5b2a8560eaefd53 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 27 May 2012 13:35:09 +0000 Subject: [PATCH] bridge: Show NO-CARRIER for ports instead of STP state. However, it is not very clear why a certain port has got that status. NO-CARRIER implies that the device is unplugged or the link is just down. --- hooks/zones/bridge.ports/ethernet | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hooks/zones/bridge.ports/ethernet b/hooks/zones/bridge.ports/ethernet index 7383dc47..9fc1aa93 100755 --- a/hooks/zones/bridge.ports/ethernet +++ b/hooks/zones/bridge.ports/ethernet @@ -138,6 +138,8 @@ function _status() { printf " %-10s - " "${port}" if ! device_is_up ${port}; then echo -ne "${COLOUR_DOWN} DOWN ${COLOUR_NORMAL}" + elif ! device_has_carrier ${port}; then + echo -ne "${COLOUR_DOWN}NO-CARRIER${COLOUR_NORMAL}" elif [ -n "$(stp_bridge_get_protocol ${zone})" ]; then local state=$(stp_port_get_state ${zone} ${port}) local colour="COLOUR_STP_${state}" -- 2.47.3