X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=common%2Fci%2Fsetup.sh;h=3ffd36b0ceb4fa6acfb0aa21c1f74cb68cf1fbfc;hb=712a8e64a8836e664e714892f2ec610ce3d0a6f6;hp=73b0aa6035b898433379360bd6d2725370eb202b;hpb=b0155412940f4a185b58ebd87761b8bdbfdeb6b1;p=genesis.git diff --git a/common/ci/setup.sh b/common/ci/setup.sh old mode 100644 new mode 100755 index 73b0aa6..3ffd36b --- a/common/ci/setup.sh +++ b/common/ci/setup.sh @@ -128,7 +128,7 @@ setup_pxe_bridge() { #Check whether PXE bridge exists echo "${blue}Checking whether PXE bridge ${pxe_bridge} exists${reset}" - if brctl show ${pxe_bridge} | grep 'No such device'; then + if brctl show ${pxe_bridge} 2>&1 | grep 'No such device'; then echo "${blue}Creating PXE bridge ${pxe_bridge}${reset}" brctl addbr ${pxe_bridge} else @@ -140,10 +140,10 @@ setup_pxe_bridge() { #Add VLAN 0 (PXE) interface to PXE bridge echo "${blue}Checking whether VLAN 0 (PXE) interface ${pxe_interface} is added to PXE bridge ${pxe_bridge} exists${reset}" - if ! brctl show ${pxe_bridge} | grep ${pxe_interface}; then + if ! brctl show ${pxe_bridge} 2>&1 | grep ${pxe_interface}; then echo "${blue}Adding VLAN 0 (PXE) interface ${pxe_interface} to PXE bridge ${pxe_bridge}${reset}" brctl addif ${pxe_bridge} ${pxe_interface} - if ! brctl show ${pxe_bridge} | grep ${pxe_interface}; then + if ! brctl show ${pxe_bridge} 2>&1 | grep ${pxe_interface}; then echo "${red}Could not add VLAN 0 (PXE) interface ${pxe_interface} to PXE bridge ${pxe_bridge}${reset}" exit 1 fi