File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed 
templates/common/_base/files Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -53,19 +53,13 @@ contents:
5353    fi 
5454     
5555    # Get the port's master. If it doesn't have any, assume it's not our bridge 
56-     BRIDGE_ID=$(nmcli -t -f connection.master  conn show "${PORT_CONNECTION_UUID}" | awk -F ':' '{print $NF}') 
56+     BRIDGE_ID=$(nmcli -t -f general.name  conn show "${PORT_CONNECTION_UUID}" | awk -F ':' '{print $NF}') 
5757    if [ "${BRIDGE_ID}" == "" ]; then 
5858        exit 0 
5959    fi 
6060
6161    # Get the bridge name 
62-     BRIDGE_NAME=$(nmcli -t -f connection.interface-name conn show "${BRIDGE_ID}" | awk -F ':' '{print $NF}') || true  
63-     if [ "${BRIDGE_NAME}" == "" ]; then 
64-         #Check if br-ex is managed by nmstate (br-ex-br) 
65-         PORT_CONNECTION_UUID=$(nmcli -t -f device,type,uuid conn | awk -F ':' '{if( $1=="br-ex" && $2~/^ovs-bridge/) print $NF}') 
66-         BRIDGE_ID=$(nmcli -t -f connection.id conn show "${PORT_CONNECTION_UUID}" | awk -F ':' '{print $NF}') 
67-         BRIDGE_NAME=$(nmcli -t -f connection.interface-name conn show "${BRIDGE_ID}" | awk -F ':' '{print $NF}') 
68-     fi 
62+     BRIDGE_NAME=$(nmcli -t -f connection.master conn show "${BRIDGE_ID}" | awk -F ':' '{print $NF}') || true  
6963    # Limit this to br-ex and br-ex1 only. If one wanted to enable this for all OVS bridges, 
7064    # the condition would be: if [ "$BRIDGE_NAME" == "" ]; then 
7165    if [ "${BRIDGE_NAME}" != "br-ex" ] && [ "${BRIDGE_NAME}" != "br-ex1" ]; then 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments