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

[Xen-devel] [OSSTEST PATCH 2/4] ts-xen-install: networking: Bail if we expected a bridge but there wasn't one



If we have been told that there should already be a bridge, but there
isn't one, we would previously rewrite the networking config just in
case (mainly to make it static).  Instead, quit the /e/n/i editing in
this case.

Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 ts-xen-install |   12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/ts-xen-install b/ts-xen-install
index 433a6d3..b148163 100755
--- a/ts-xen-install
+++ b/ts-xen-install
@@ -285,17 +285,15 @@ sub nodhcp () {
        }
        my ($iface,$bridgex);
 
-       if ($initscripts_nobridge) {
-           $iface= 'xenbr0';
-           $bridgex= <<END;
+       if (!$initscripts_nobridge) {
+           target_editfile_cancel("no bridge but old xend setup");
+       }
+       $iface= 'xenbr0';
+       $bridgex= <<END;
     bridge_ports $physif
     bridge_fd 0
     bridge_stp off
 END
-       } else {
-           $iface= $physif;
-           $bridgex= '';
-        }
 
        my $routes= target_cmd_output_root($ho, "route -n");
 
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.