[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



From: Chris Lalancette <clalance 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
    things.

    Signed-off-by: Chris Lalancette <clalance 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
-- 
1.5.5.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]