[Ovirt-devel] [PATCH]: Allow the WUI to manage the hardware it is running on

Chris Lalancette clalance at redhat.com
Fri Sep 5 07:57:08 UTC 2008


    Fix up the awk script to *exactly* match the bridge we are looking for.
    This is an issue if you happen to have multiple bridges up, like ovirtbr0,
    ovirtbr1 and now the script basically scribbles over them when looking for
    things.
    
    Signed-off-by: Chris Lalancette <clalance at redhat.com>

diff --git a/wui-appliance/create-wui-appliance.sh b/wui-appliance/create-wui-appliance.sh
index d8137b1..b81ed68 100755
--- a/wui-appliance/create-wui-appliance.sh
+++ b/wui-appliance/create-wui-appliance.sh
@@ -221,7 +221,7 @@ fi
 # Remove old bridge device if it exists
 sed -i "/# $BRIDGENAME/d" /etc/rc.d/rc.local
 old_bridge=$(brctl show \
-    | awk -v BRIDGENAME=$BRIDGENAME '$1~BRIDGENAME {print $4}')
+    | awk -v BRIDGENAME=$BRIDGENAME '$1==BRIDGENAME {print $4}')
 if [ -n "$old_bridge" ]; then
     echo "Removing old bridge $old_bridge"
     ifconfig $old_bridge down




More information about the ovirt-devel mailing list