X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=xenserver%2Fopt_xensource_libexec_interface-reconfigure;h=2b6f62b46dd9ddf1be560ecbe73b5740e283e29b;hb=fa0361b7a085abd460a5a6236b137a69d871f8c5;hp=1d91675d15c6809ee7fea12e9652aee48a26d13b;hpb=42061b2a5b79d44c0ff9442a8203f0c7672ee9cf;p=openvswitch diff --git a/xenserver/opt_xensource_libexec_interface-reconfigure b/xenserver/opt_xensource_libexec_interface-reconfigure index 1d91675d..2b6f62b4 100755 --- a/xenserver/opt_xensource_libexec_interface-reconfigure +++ b/xenserver/opt_xensource_libexec_interface-reconfigure @@ -1,8 +1,18 @@ #!/usr/bin/python # -# Copyright (c) 2008,2009 Citrix Systems, Inc. All rights reserved. +# Copyright (c) 2008,2009 Citrix Systems, Inc. # Copyright (c) 2009 Nicira Networks. # +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published +# by the Free Software Foundation; version 2.1 only. with the special +# exception on linking described in file LICENSE. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# """Usage: %(command-name)s up @@ -1259,7 +1269,7 @@ def datapath_modify_config(commands): for c in commands: log(" %s" % c) - rc = run_command(['/root/vswitch/bin/ovs-cfg-mod', '-vANY:console:emer', + rc = run_command(['/usr/bin/ovs-cfg-mod', '-vANY:console:emer', '-F', '/etc/ovs-vswitchd.conf'] + [c for c in commands if c[0] != '#'] + ['-c']) if not rc: @@ -1474,18 +1484,7 @@ def action_up(pif): cfgmod_argv += ['--add=vlan.%s.tag=%s' % (ipdev, pifrec['VLAN'])] cfgmod_argv += ['--add=iface.%s.internal=true' % (ipdev)] cfgmod_argv += ['--add=iface.%s.fake-bridge=true' % (ipdev)] - if not os.path.exists(vswitch_state_dir): - os.mkdir(vswitch_state_dir) - br = ConfigurationFile("br-%s" % ipdev, vswitch_state_dir) - br.write("VLAN_SLAVE=%s\n" % bridge) - br.write("VLAN_VID=%s\n" % pifrec['VLAN']) - br.close() - f.attach_child(br) - else: - br = ConfigurationFile("br-%s" % ipdev, vswitch_state_dir) - br.unlink() - f.attach_child(br) - + # Apply updated configuration. try: f.apply()