[Ovirt-devel] [PATCH ovirt-appliance] Allow the appliance to manage the hardware it is running on - part 2

Alan Pevec apevec at redhat.com
Tue Sep 9 00:23:00 UTC 2008

From: Chris Lalancette <clalance at redhat.com>

    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

    Signed-off-by: Chris Lalancette <clalance at redhat.com>
 create-ovirt-appliance |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/create-ovirt-appliance b/create-ovirt-appliance
index 035dce7..d3800e7 100755
--- a/create-ovirt-appliance
+++ b/create-ovirt-appliance
@@ -220,7 +220,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