diff options
| author | Ian Campbell <ian.campbell@citrix.com> | 2009-09-09 18:09:00 +0100 |
|---|---|---|
| committer | Ben Pfaff <blp@nicira.com> | 2009-09-09 10:41:38 -0700 |
| commit | e44d18446300163c9c3026e4cdcbb8ec4ab8907e (patch) | |
| tree | 24abc90fb3e07813ddfbe18e93f7c9441150b09e /xenserver/opt_xensource_libexec_interface-reconfigure | |
| parent | 1cee7f2815c37b136a0bc071571cb05355277695 (diff) | |
| download | openvswitch-e44d18446300163c9c3026e4cdcbb8ec4ab8907e.tar.gz | |
Move vswitch state files to /var/lib.
I believe this is the correct location for files of this type.
Diffstat (limited to 'xenserver/opt_xensource_libexec_interface-reconfigure')
| -rwxr-xr-x | xenserver/opt_xensource_libexec_interface-reconfigure | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/xenserver/opt_xensource_libexec_interface-reconfigure b/xenserver/opt_xensource_libexec_interface-reconfigure index 61027c5fc..f4afc9f31 100755 --- a/xenserver/opt_xensource_libexec_interface-reconfigure +++ b/xenserver/opt_xensource_libexec_interface-reconfigure @@ -71,8 +71,8 @@ output_directory = None db = None management_pif = None -dbcache_file = "/etc/ovs-vswitch.dbcache" -vswitch_config_dir = "/etc/openvswitch" +vswitch_state_dir = "/var/lib/openvswitch/" +dbcache_file = vswitch_state_dir + "dbcache" class Usage(Exception): def __init__(self, msg): @@ -1131,9 +1131,9 @@ def action_up(pif): # /etc/xensource/scripts/vif needs to know where to add VIFs. if vlan_slave: - if not os.path.exists(vswitch_config_dir): - os.mkdir(vswitch_config_dir) - br = ConfigurationFile("br-%s" % bridge, vswitch_config_dir) + if not os.path.exists(vswitch_state_dir): + os.mkdir(vswitch_state_dir) + br = ConfigurationFile("br-%s" % bridge, vswitch_state_dir) br.write("VLAN_SLAVE=%s\n" % datapath) br.write("VLAN_VID=%s\n" % pifrec['VLAN']) br.close() @@ -1233,7 +1233,7 @@ def action_up(pif): argv += ['--add=iface.%s.fake-bridge=true' % (ipdev)] else: try: - os.unlink("%s/br-%s" % (vswitch_config_dir, bridge)) + os.unlink("%s/br-%s" % (vswitch_state_dir, bridge)) except OSError: pass argv += ['--del-match=bridge.%s.xs-network-uuids=*' % datapath] |
